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
When the editor direction is set to RTL with rtlMoveVisually set to true (the default in most occasions), entering an opening bracket causes a cursor jump to the wrong direction. Instead of entering a closing bracket and putting the cursor in the middle, the cursor jumps an extra character ahead, possibly to the next line if it exists.
I tried reading through the code and I believe the reason is that in closebrackets.js, in handleChar, this flow uses the goCharLeft command. In visual RTL moving the cursor left means moving it forward rather than backwards, so CodeMirror enters a closing bracket and moves the cursor further forward.
The text was updated successfully, but these errors were encountered:
When the editor direction is set to RTL with
rtlMoveVisually
set totrue
(the default in most occasions), entering an opening bracket causes a cursor jump to the wrong direction. Instead of entering a closing bracket and putting the cursor in the middle, the cursor jumps an extra character ahead, possibly to the next line if it exists.I tried reading through the code and I believe the reason is that in
closebrackets.js
, inhandleChar
, this flow uses thegoCharLeft
command. In visual RTL moving the cursor left means moving it forward rather than backwards, so CodeMirror enters a closing bracket and moves the cursor further forward.The text was updated successfully, but these errors were encountered: