Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement virtual space #228680

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

x17jiri
Copy link

@x17jiri x17jiri commented Sep 15, 2024

Implementation of virtual space as discussed here: #13960

Examples of this feature:
rec.webm
rec2.webm

Most of the changes fall into one of these categories:

  • updated move commands to allow moving the cursor beyond end of line
  • code updated to properly handle column numbers beyond the end of line
  • CursorPosition.leftoverVisibleColumns replaced with columnHint, which contains the column number that we want to stay in. This makes the calculations easier, but the change needed to be propagated to a few places.

Notable changes in specific files:

  • replaceCommand.ts - updated to add spaces when typing beyond end of line
  • mouseTarget.ts - updated to generate column for mouse positions beyond end of line
  • viewLines.ts - this change was necessary to allow virtual space also on last line of a file
  • cursorWordOperations.ts - without this change, Ctrl + Right Arrow (next word) beyond end of line goes to the end of the line instead of the next line

Testing:

  • I added a simple unit test but can implement more

@x17jiri
Copy link
Author

x17jiri commented Sep 15, 2024

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants