mirror of
https://github.com/Microsoft/vscode
synced 2024-11-05 18:29:38 +00:00
Fixing the issue with model not appearing on undo (control+z)
This commit is contained in:
parent
db1d08b7fd
commit
2cc280494e
1 changed files with 4 additions and 6 deletions
|
@ -61,10 +61,10 @@ class StickyScrollController implements IEditorContribution {
|
|||
return;
|
||||
} else {
|
||||
this._editor.addOverlayWidget(this.stickyScrollWidget);
|
||||
this._sessionStore.add(this._editor.onDidChangeModel(() => this._update(true)));
|
||||
this._sessionStore.add(this._editor.onDidChangeModel(() => setTimeout(() => this._update(true), 1000)));
|
||||
this._sessionStore.add(this._editor.onDidScrollChange(() => this._update(false)));
|
||||
this._sessionStore.add(this._editor.onDidChangeModelContent(() => this._update(true)));
|
||||
this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(() => this._update(true)));
|
||||
this._sessionStore.add(this._editor.onDidChangeModelContent(() => setTimeout(() => this._update(true), 1000)));
|
||||
this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(() => setTimeout(() => this._update(true), 1000)));
|
||||
this._update(true);
|
||||
}
|
||||
}
|
||||
|
@ -154,15 +154,13 @@ class StickyScrollController implements IEditorContribution {
|
|||
}
|
||||
}
|
||||
}
|
||||
private _renderStickyScroll() {
|
||||
|
||||
private _renderStickyScroll() {
|
||||
if (!(this._editor.hasModel())) {
|
||||
return;
|
||||
}
|
||||
|
||||
const lineHeight: number = this._editor.getOption(EditorOption.lineHeight);
|
||||
const model = this._editor.getModel();
|
||||
|
||||
const scrollTop = this._editor.getScrollTop();
|
||||
let scrollDirection: ScrollDirection;
|
||||
if (this._lastScrollPosition < scrollTop) {
|
||||
|
|
Loading…
Reference in a new issue