Skip to content

SourceView: Save and restore selection when focus out and in#1713

Draft
jeremypw wants to merge 2 commits intomasterfrom
jeremypw/focus-follow/preserve-selection
Draft

SourceView: Save and restore selection when focus out and in#1713
jeremypw wants to merge 2 commits intomasterfrom
jeremypw/focus-follow/preserve-selection

Conversation

@jeremypw
Copy link
Copy Markdown
Collaborator

@jeremypw jeremypw commented May 3, 2026

It was noticed that since #1663, it is possible to accidentally stray into the terminal pane when selecting text and this causes the selection to be lost.

There does not seem to be an advantage in losing the selection when the document focuses out so this PR saves and restores the selection on focus out/in.

Opinion sought whether this behaviour is undesirable under some circumstances and whether it is worth making optional.

Note that the selection is also now maintained when switching tabs.

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.

1 participant