Skip to content

Option to disable right-to-left #592

Closed

Description

@TxHawks

Is there a way to disable the reordering and right-alignment of rtl languages like Arabic and Hebrew? It really messes up vim and tmux

Activity

  1. mintty commented on Sep 20, 2016

    @mintty
    Owner

    No. “It’s not a bug, it’s a feature.”
    Without this feature, you should probably not try to display RTL anyway, or does vim have its own RTL approach?

  2. mintty commented on Sep 21, 2016

    @mintty
    Owner

    Actually, I don't even see any issue with either tmux or vim. All looks fine here for me. What do you mean by "messes up"?

  3. TxHawks commented on Sep 22, 2016

    @TxHawks
    Author

    Thanks for the quick reply.

    Of course it's a feature, and a great one. But at times, I'd like to be able to disable it.

    The feature works great when there is some rtl text mixed inside an otherwise ltr paragraph, however, in vi, a line that either starts or ends with rtl` text in it, be indented to the right, or worse - part of the line will be indented to the right and and some to the left. When split windows are involved, it gets really difficult to handle.

    Here is a screenshot, see line 2 and 3:
    image

    I doubt mintty can do anything to handle it better, but an option to runt mintty without the bidi feature enabled would be helpful

  4. mintty commented on Sep 22, 2016

    @mintty
    Owner

    In theory, I see two possibilities to handle RTL in a context-dependent way that could meet the use case:

    • Support DEC margin mode and apply RTL only within current margins.
    • Support the Unicode RTL direction control characters.

    In both cases, however, your application would need to support the mechanism, too, to achieve the desired effect (e.g. draw each panel with respective margins set).
    In my own text editor (MinEd) I had the same problem when opening a menu that overlays a bidi line. This was solved by clearing such lines before drawing the menu.

    About a global option to disable bidi, I'm still hesitating whether to consider that a good idea. I acknowledge, though, that putty (from which mintty was once derived) has such an option. Maybe some more discussion or nagging is needed...

  5. TxHawks commented on Sep 25, 2016

    @TxHawks
    Author

    Both these possibilities seem like nice additions, but as you mention yourself, they cannot guaranty a working solution.

    Bidi is indeed a nice feature for a terminal emulator, but since it often ends up being more trouble than it is worth, I think it's a god idea to allow users to disable it at will. And, indeed, Putty, too, provides an option to disable. And, in my opinion, for a good reason.

  6. mintty commented on Sep 26, 2016

    @mintty
    Owner

    As I don't want people to accidentally misconfigure mintty with respect to its default behaviour,
    I'm considering a command-line-only option, like
    --disable-bidi
    or (shorter?)
    --nobidi.

  7. TxHawks commented on Sep 26, 2016

    @TxHawks
    Author

    +1 for --nobidi

  8. mintty commented on Oct 7, 2016

    @mintty
    Owner

    Released in 2.6.2.

  9. TxHawks commented on Oct 7, 2016

    @TxHawks
    Author

    Thanks!

  10. mintty commented on Apr 12, 2017

    @mintty
    Owner

    While implementing partial support for bidi markers, it became apparent that this is not sufficient to control absolute positioning. A switching sequence may be added.

  11. mintty commented on Apr 13, 2017

    @mintty
    Owner

    Released 2.7.6.

  12. mintty commented on May 19, 2017

    @mintty
    Owner

    Released 2.7.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions