Skip to content

Commit

Permalink
slightly adjust preferred column update timeout
Browse files Browse the repository at this point in the history
It seems that onDidChangeTextEditorSelection is being fired more often
and/or differently in vscode 1.75.0 so the setTimeout(0) hack is not
long enough to allow the outstanding motions to drain. For now increase
the timeout to try avoid cursor in the wrong position bug while we think
about a better solution.
  • Loading branch information
alisonatwork committed Feb 28, 2024
1 parent 1bf4606 commit ac0da9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Dispatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export class Dispatcher {
await ActionMode.switchByActiveSelections(this._currentMode.id);
ActionMoveCursor.updatePreferredColumn();
this._currentMode.onDidChangeTextEditorSelection();
}, 0);
}, 2);
}),
window.onDidChangeActiveTextEditor(async () => {
if (Configuration.defaultModeID === ModeID.INSERT) {
Expand Down

0 comments on commit ac0da9e

Please sign in to comment.