You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
【yml editor】Shortcut key comment not following cursor #159
At first I couldn't reproduce it. The key seems to be that problems ensue if the text selection is of length zero. In other words it is just a 'cursor' rather than a selection highlighting a range of characters. Even selecting just a single character makes it work correctly. But if change selection, for example, by moving the cursor around the document using the arrow keys, then, the next time we call on 'Toggle Comment' it triggers at the last location where a non-empty text selection was made.
Seems like this is some sort of a quirk caused by the Eclipse 'selection service'. I think it is skipping over 'empty' selections and so to the 'Toggle comment' handler it is as if those cursor movements never happened. I'll have to debug it a bit more to be sure of this explanation, and to find a suitable fix.
In the mean time a simple workaround is to make sure you select at least one character before triggering 'toggle comment'.
Activity
[-]【yml editor】Shortcut key comment problem[/-][+]【yml editor】Shortcut key comment not following cursor[/+]mweirauch commentedon Dec 5, 2018
Can confirm this regression. Same version.
kdvolder commentedon Dec 5, 2018
At first I couldn't reproduce it. The key seems to be that problems ensue if the text selection is of length zero. In other words it is just a 'cursor' rather than a selection highlighting a range of characters. Even selecting just a single character makes it work correctly. But if change selection, for example, by moving the cursor around the document using the arrow keys, then, the next time we call on 'Toggle Comment' it triggers at the last location where a non-empty text selection was made.
Seems like this is some sort of a quirk caused by the Eclipse 'selection service'. I think it is skipping over 'empty' selections and so to the 'Toggle comment' handler it is as if those cursor movements never happened. I'll have to debug it a bit more to be sure of this explanation, and to find a suitable fix.
In the mean time a simple workaround is to make sure you select at least one character before triggering 'toggle comment'.
Fix for #159