premierlangage icon indicating copy to clipboard operation
premierlangage copied to clipboard

[BUG] Inconsistent semantic of Ctrl-leftarrow and Ctrl-rightarrow in editor

Open fwjmath opened this issue 4 years ago • 3 comments

In the editor, Ctrl-leftarrow works like in many graphical text editing interfaces, but not Ctrl-rightarrow, as it has been redefined.

Reproduction

  1. Open a file with several words, locate to the middle of a word.
  2. 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.

fwjmath avatar Nov 11 '20 12:11 fwjmath

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.

nthiery avatar Nov 11 '20 13:11 nthiery

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.

mciissee avatar Nov 11 '20 13:11 mciissee

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.

nheir avatar Nov 06 '22 10:11 nheir