Skip to content

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

Closed
jeremypw wants to merge 3 commits into
masterfrom
jeremypw/focus-follow/preserve-selection
Closed

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

Conversation

@jeremypw

@jeremypw jeremypw commented May 3, 2026

Copy link
Copy Markdown
Collaborator

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.

@jeremypw jeremypw added this to the 8.3.2 milestone Jun 20, 2026
# Conflicts:
#	src/Services/Document.vala
#	src/Structs/SelectionRange.vala
@jeremypw

jeremypw commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator Author

CLosing as stripping no longer takes place if there is a selection.

@jeremypw jeremypw closed this Jul 2, 2026
@jeremypw jeremypw deleted the jeremypw/focus-follow/preserve-selection branch July 2, 2026 18:54
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