Skip to content

Commit

Permalink
Scroll input right when setting selection at end
Browse files Browse the repository at this point in the history
Fixes #115152
  • Loading branch information
alexr00 committed Feb 3, 2021
1 parent c5bf128 commit 268bb6e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/vs/base/browser/ui/inputbox/inputBox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,9 @@ export class InputBox extends Widget {

if (range) {
this.input.setSelectionRange(range.start, range.end);
if (range.end === this.input.value.length) {
this.input.scrollLeft = this.input.scrollWidth;
}
}
}

Expand Down

0 comments on commit 268bb6e

Please sign in to comment.