Community
Participate
Working Groups
Build ID: I20220215-1800 When I have a selection across multiple lines in "reverse" direction (so the caret is at the start of the selection) and I press Shift+Home or Shift+End, the selection direction is "reversed" (the caret is at the end of the selection). Steps to reproduce: - Open a new untitled text file - Enter the following text: LINE 1 LINE 2 LINE 3 LINE 4 LINE 5 - Place the cursor before the "5" - Press Shift + Up twice - Observe that the caret now is before "3" - Press Shift + End - Observe that the caret now is before "5" Expected behavior: - The caret should be after "3" I suspect this was introduced with the support for multiple selection ranges (Bug 466532) due to the changes to AbstractTextEditor.LineEndAction#run and AbstractTextEditor.LineStartAction#run. Its underlying cause might be the fact that StyledText.getSelectionRanges() always returns the selection length >= 0, unlike StyledText.setSelectionRanges(), which uses length < 0 for "reverse" selections.
Can still reproduce on head as of today. @Mickael: any chance to have a fix for 4.23?
(In reply to Andrey Loskutov from comment #1) > @Mickael: any chance to have a fix for 4.23? I can't tell yet, I'm on PTO tomorrow evening until end of next week and have some other work that I think is much more important to tackle at the moment. I'll try but it's very probable I won't have time for it. It also depends on what gets added to my backlog when I'm away, so I cannot really even plan.
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.text/+/190925
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.text/+/190925 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.text.git/commit/?id=2ad4b7d7373ac73db2ca7daa24defec9dcc94138