mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 03:29:00 +01:00
review changes
This commit is contained in:
@@ -47,6 +47,8 @@ export abstract class EditModeStrategy {
|
||||
abstract hasFocus(): boolean;
|
||||
|
||||
abstract getWidgetPosition(): Position | undefined;
|
||||
|
||||
abstract needsMargin(): boolean;
|
||||
}
|
||||
|
||||
export class PreviewStrategy extends EditModeStrategy {
|
||||
@@ -145,6 +147,10 @@ export class PreviewStrategy extends EditModeStrategy {
|
||||
hasFocus(): boolean {
|
||||
return this._widget.hasFocus();
|
||||
}
|
||||
|
||||
needsMargin(): boolean {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
class InlineDiffDecorations {
|
||||
@@ -359,6 +365,10 @@ export class LiveStrategy extends EditModeStrategy {
|
||||
return lastLineOfLocalEdits ? new Position(lastLineOfLocalEdits, 1) : undefined;
|
||||
}
|
||||
|
||||
override needsMargin(): boolean {
|
||||
return Boolean(this._session.lastTextModelChanges.length);
|
||||
}
|
||||
|
||||
hasFocus(): boolean {
|
||||
return this._widget.hasFocus();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user