Skip to content

Commit

Permalink
fix jupyterlab#10391 (incorrect cursor position after autocomplete)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmonad committed Jul 19, 2021
1 parent 3523819 commit 00755c3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/completer/src/handler.ts
Expand Up @@ -188,6 +188,7 @@ export class CompletionHandler implements IDisposable {
const { start, end, value } = patch;
// we need to update the shared model in a single transaction so that the undo manager works as expected
editor.model.sharedModel.updateSource(start, end, value);
editor.setCursorPosition(editor.getPositionAt(start + value.length)!);
}

/**
Expand Down

0 comments on commit 00755c3

Please sign in to comment.