It's implemented even in the Windows Notepad.
Consider use cases: - you've cut something, but missed a character or a line - you're undoing, adjusting your selection, cutting again - you've replaced all in selection using a regex, and now notice that you've missed some cases, you're undoing, editing regex, replacing again
Currently the selection is gone after undo, you have to select again. Counterproductive.
This is a problem with [Scintilla](www.scintilla.org) the editing component we use. Its documentation says: "Scintilla does not save caret and **selection** movements, view scrolling and the like." (my emphasis).
It will have to be added by that project, but it has been rejected several times to my recollection, so you will need to marshal some good arguments and probably a patch.
Thanks, I've found [the bug](https://sourceforge.net/p/scintilla/bugs/1224/). It's crazy that they're rejecting this.
Closed #1367.
@Forkest To be fair, its only rejected as a bug, and it was changed to a feature request. So if someone provided a reasonable patch it might be accepted, but the maintainer has warned that it may not be technically simple.
This annoys me all the time with the search and replace in selection feature (you spend time selecting a specific region and then Geany clobbers it when you undo the operation). For my use, I don't need all undo events to keep the selection info, just the last edit. I think this subset of the functionality could be implemented in Geany quite cleanly without changes to Scintilla.
Reopened #1367.
github-comments@lists.geany.org