premierlangage
premierlangage copied to clipboard
[BUG] Inconsistent semantic of Ctrl-leftarrow and Ctrl-rightarrow in editor
In the editor, Ctrl-leftarrow works like in many graphical text editing interfaces, but not Ctrl-rightarrow, as it has been redefined.
Reproduction
- Open a file with several words, locate to the middle of a word.
- Type Ctrl-leftarrow, then Ctrl-rightarrow.
Expected Behavior The cursor should move to the beginning of the word, then to the end of the word.
Actual Behavior The cursor first moves to the beginning of the word, then the editing space is split into two, with the current file opened again in the second half.
Possible solution Redefine the shortcut for Ctrl-rightarrow, or remove the shortcut if splitting is not a functionnality being frequently used.
Yes, pleaaaaaase! Ctrl-arrow for moving around is hard coded in my fingers and I find the current behavior very annoying, especially since there is no obvious way to undo the splitting.
Sorry but this repository is linked to the next major version (1.0.0) of platform, the issue you are describing here is related to the editor of the current version. All the issues related to the current version (0.7.4) should be created on the repository https://github.com/PremierLangage/premierlangage.
In any case I will move this issue to the right repository now and close it once the issue will be resolved.
Related lines
https://github.com/PremierLangage/premierlangage/blob/1f20333ed4c8d93bf49f4ba330b37b492e19360d/frontend/editor/src/app/pages/editor/workspace/code-editor/code-editor.component.ts#L131-L133
If not removed, the Alt can be use to refine the shortcut to avoid collision with usual editors' shortcuts.