Write a text in an RTL language (e.g. Hebrew) that ends with an LTR language (e.g. English). I used "ניסיון ABC". Unlike here in this text, the ABC should appear to the left of the Hebrew word.
In that line, press the <End> key. The cursor is actually before the English word instead of after it.
If at this point you press <Enter>, the English word will move to the next line. The expected behavior is of course that <End> followed by <Enter> will start a new empty line.
The text was updated successfully, but these errors were encountered:
The bidi handling in CodeMirror 5.x is a bit of a tangled (and, in parts, misguided) mess. I just checked the upcoming version 6, which seems to handle this properly.
It is unlikely that I'll patch this in 5.x, but if you want to try your hand at a pull request, that'd be welcome. Upgrading to the new code is not really recommended yet unless you're willing to deal with beta-quality, somewhat-unstable software, but will be the recommended way to deal with this on the long term.
When in visual RTL mode, if the last word in a line is an English one, the End key (and the
lineEndcommand) jump to the wrong place.Way to recreate, in an RTL CodeMirror instance, e.g. https://codemirror.net/demo/bidi.html:
<End>key. The cursor is actually before the English word instead of after it.<Enter>, the English word will move to the next line. The expected behavior is of course that<End>followed by<Enter>will start a new empty line.The text was updated successfully, but these errors were encountered: