Skip to content

Commit

Permalink
fix race movePrimaryCursorIntoVisibleRange
Browse files Browse the repository at this point in the history
  • Loading branch information
zpencer committed Aug 2, 2024
1 parent 6213a01 commit 616eea4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/emulator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,11 @@ export class EmacsEmulator implements IEmacsController, vscode.Disposable {
this.commandRegistry.register(new MoveCommands.EndOfBuffer(this));
this.commandRegistry.register(new MoveCommands.ScrollUpCommand(this));
this.commandRegistry.register(new MoveCommands.ScrollDownCommand(this));
vscode.window.onDidChangeTextEditorVisibleRanges(() => {
if (Configuration.instance.strictEmacsMove) {
MoveCommands.movePrimaryCursorIntoVisibleRange(this.textEditor, this.isInMarkMode, this);
}
}, this, this.disposables);
this.commandRegistry.register(new MoveCommands.ForwardParagraph(this));
this.commandRegistry.register(new MoveCommands.BackwardParagraph(this));
this.commandRegistry.register(new EditCommands.DeleteBackwardChar(this));
Expand Down

0 comments on commit 616eea4

Please sign in to comment.