-
-
Notifications
You must be signed in to change notification settings - Fork 625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CTL Cursor Movement (Backwards) #112
Comments
I knew I would need to face the RTL-issue sooner or later =D To sum up what I've already done on supporting RTL: Unfortunately, nothing. So there are, if I remember correctly, some settings that can be set on CodeMirror itself to enable better RTL-support. I'm not sure which ones, so if you'd want to supply me with some kind of test Markdown-file containing some Hebrew and English words/phrases/sentences, I could do some testing (I already have quite a collection of different Markdown test files which I open up subsequently before publishing a new release, so this would be the logical next test file). I'll have a look into it. And in the meantime, please look out for potential other pitfalls that may occur during RTL text usage! :) |
Okay, another major one is font. I don't know if it's possible to set an alternative font for specific unicode ranges or something like that but right now that's probably Zettlr's biggest weakness handling the Hebrew I'm working with. |
Mh, yes, the fonts are indeed a problem. I'm also in contact with an Islamic Scientist who's also had problems writing Persian and Arabic glyphs, which is why I switched to Liberation Mono for the monospaced fonts. It is really hard to get both the font contain the glyphs and CodeMirror to display them. There are some accents that CodeMirror can't display correctly :/ And I'm not sure whether it would make sense to allow special glyphs to be displayed in a different font, because normally the app should already do this (sometimes when you write exotic glyphs, you may see the font is different for them, which is the app fetching the glyph from a fallback font) |
I just remembered the magical keyword for CodeMirror: It's "bidi", and I directly found this: So in case that works I can implement a non-persistent switch somewhere easily accessible to momentarily switch the base direction. I don't know where to put it, but what you could do in the meantime to test it, would be to do the following:
|
Hmm, I haven't tried it yet but this doesn't sound like it'll solve the problem. My base direction is actually still consistently I'll give it a try (maybe this weekend) and let you know. |
I fear this as well, but maybe we'll find something that works out for you! |
Any updates on this one? |
I just made sure I was still up to date. The sample above |
The font mainly concerns the glyphs available, so there's not so much it can do concerning the cursor movement. But I am starting to think that this issue should be posed with CodeMirror, as it concerns the inner workings of the editor. Would you mind transferring it there? I think Marijn can help you more than I can :S |
Mh, I'll close this issue --- if the BiDirectional issues still occur, I'd really suggest opening issues on the CodeMirror repository, as this issue more or less is out of my scope! |
Description
CTL (Complex Text Layout) text is text that involves both LTR (left-to-right) and RTL (right-to-left) content. When using
<ctrl>
+<left arrow>
to jump back over words, the cursor gets stuck on CTL text.Reproducing
With the text
one אלהים" three
and the cursor at the end of the line, repeatedly use<ctrl>
+<left arrow>
to move to the start of the line.Expected behaviour
The cursor will eventually reach the start of the line
Actual Behaviour
In reality, the cursor jumps backwards and forwards across the RTL text.
Platform
Additional information
This is related to the RTL text itself and the quotation mark in the text. אלהים produces this behaviour but שׁני did not when I tested it. I think the quotation mark affects where the cursor lands relative to other text and so is also important in producing this behaviour. I haven't figured out anything more that explains the behaviour. I assume that this is a codemirror bug but I thought I'd start here.
The text was updated successfully, but these errors were encountered: