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

Resizing terminal is causing selected content to shift #5300

Open
Tyriar opened this issue Jan 21, 2025 · 1 comment
Open

Resizing terminal is causing selected content to shift #5300

Tyriar opened this issue Jan 21, 2025 · 1 comment
Labels
area/selection type/bug Something is misbehaving

Comments

@Tyriar
Copy link
Member

Tyriar commented Jan 21, 2025

VS Code issue: microsoft/vscode#238273

Image

@jerch
Copy link
Member

jerch commented Jan 21, 2025

Oh well, this looks like a non-trivial issue to me. The question here is - how should the selection reflow at all?

Basically I'd suggest, that if the selection is strictly starting/ending on text holding cells, reflow selection with that text content (kinda trivial default case).

Next the question is - what should happen, if the selection starts/ends on empty cells? Ideas:

  • if the empty start/end cell will be preserved by reflow (thats the case, if text is following later in that line*), just do default scheme
  • if the empty cell is right of any text in a line*, things will get stripped away by reflow - maybe try to preverse selected empty cell amount clamped to max row length (thus might be shorter if the row ends up being shorter than before)

[*] line here means real text lines, thus taking wrapping into account


Edit: A much simpler solution might be to just clear selections alway on resize, thus it cannot be carried over on resize.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/selection type/bug Something is misbehaving
Projects
None yet
Development

No branches or pull requests

2 participants