Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

RTL text selection #10132

Open
Open

Description

@salar90

When trying to select a RTL substring, the highlighted text seems to be current but if you just press delete button, It will delete another part of the text instead of highlighted.

also double clicking on the text will highlight another word/part of text.

It behaves like the position of the mouse is horizontally invert on the RTL text.

Simulate it:
First Test:
این یک متن فارسی است
Select این With mouse down and mouse up and Press Delete button, and it will delete است instead of این:
این یک متن فارسی

Second Test:
این یک متن فارسی است
Double click on رسی
رسی will be Highlighted but if you press delete, این will be deleted.

Activity

  1. ebraminio commented on Jun 1, 2016

    @ebraminio

    To devs, consider reading 1 and 2 for getting some context.

  2. mohataher commented on Jul 17, 2016

    @mohataher
  3. salar90 commented on Aug 4, 2016

    @salar90
    Author

    @mohataher I Installed yesterday and problem still exists.

    @Majid-Kaffash I think its not a good idea to change the Editors entire direction for every time you want to edit a none English word or sentence. even with text-align:left

  4. majidkn commented on Aug 4, 2016

    @majidkn

    @salar90 I'm agree with you . But in this situation the only thing that you can do is this :)

  5. AbdelrahmanHafez commented on Sep 6, 2016

    @AbdelrahmanHafez

    Although @Majid-Kaffash solution isn't perfect, but it works until there's a better solution. Is there anyway I can make a keybind that toggles this edit in the stylesheet?

  6. salar90 commented on Sep 7, 2016

    @salar90
    Author

    Microsoft's Visual Studio Code works perfectly in this case. Maybe Developers can inspire from its opensource codes?

    https://github.com/Microsoft/vscode

  7. abumalick commented on Nov 3, 2016

    @abumalick

    Brackets works too with RTL language. I think atom and brackets are based on electron ?
    Maybe it can help developers :
    https://github.com/adobe/brackets/
    I really want this feature in atom 👍

  8. cben commented on Nov 4, 2016

    @cben
  9. timwienk commented on Dec 19, 2016

    @timwienk

    Not a solution for "actual" RTL support (it probably even makes it very hard to read RTL text), but this way at least bidirectionality doesn't destroy the text (and selection) flow, so it's at least possible to work with files with bidirectional text:

    /* Bidirectional text is broken, so let's pretend it doesn't exist. */
    atom-text-editor::shadow {
    .line {
    unicode-bidi: bidi-override;
    }
    }

    Edit 2017-01-12:
    Small update, because of the shadow DOM changes in 1.13.0, the following code should be added to the atom stylesheet instead:

    /* Bidirectional text is broken, so let's pretend it doesn't exist. */
    atom-text-editor .line {
    	unicode-bidi: bidi-override;
    }
  10. omidamraei commented on Dec 27, 2016

    @omidamraei

    Every update is making it even worse. I was solving this problem in a tricking way by inverse selecting words. For example, previously to select این in این یک متن فارسی است, I double-clicked on است and این was being selected.

    But now in latest version 1.12.7, even this trick isn't working.

  11. abumalick commented on Dec 28, 2016

    @abumalick

    @timwienk Thanks, at least we can edit lines containing Arabic text when adding your code to atom stylesheet

  12. jalal246 commented on Feb 4, 2017

    @jalal246

    I have the same problem when I try to write in Arabic, it's really confusing for highlighted text.
    Any solutions?

  13. abumalick commented on Feb 4, 2017

    @abumalick
  14. 13 remaining items

  15. WISTFUL12 commented on Aug 20, 2017

    @WISTFUL12
  16. lajmikhalil commented on Nov 3, 2017

    @lajmikhalil

    We need this to be fixed, coding shouldn't be just for ltr languages. I'm just surprised that this is overlooked still after 4 years.

    screen shot 2017-11-03 at 4 03 20 pm

  17. lee-dohm commented on Nov 3, 2017

    @lee-dohm
    Contributor

    @lajmikhalil as I stated above, if people want to help speed up the process we would definitely welcome the help. The reality is that our resources are finite and there will be things that we can't get to as quickly as some would want. The awesome part about open source is that everyone can work on the bits of functionality that are important to them and the whole system gets better.

  18. iamsoorena commented on Nov 17, 2017

    @iamsoorena

    does anyone know which source files are related to this issue? If someone wants to help, he/she will need some context.

  19. winstliu commented on Nov 17, 2017

    @winstliu
    Contributor

    @iamsoorena since this is happening in text editors, I would start by looking at text-editor-component.js and text-editor.js.

  20. saeedhei commented on Dec 18, 2017

    @saeedhei
  21. mostafaasadi commented on Feb 22, 2018

    @mostafaasadi
  22. rsese commented on Feb 22, 2018

    @rsese
  23. salar90 commented on Feb 22, 2018

    @salar90
    Author

    I won't complain and I agree with @lee-dohm . If we RTLers want to get it better then we have to contribute. unfortunatly I don't have the knwledge about developing IDEs and Editors.

  24. shubbarm commented on Mar 12, 2018

    @shubbarm
  25. farzinfadamin commented on May 13, 2018

    @farzinfadamin
  26. acrolink commented on Jun 6, 2018

    @acrolink
  27. saeedhei commented on Jun 6, 2018

    @saeedhei

    Why atom team don't like to fix this issue? I think, you have many professional developers and why this F... RTL problem is not important for you? how a developer can develop a Multilanguage learning app without RTL?

  28. lee-dohm commented on Jun 6, 2018

    @lee-dohm
    Contributor

    Thanks everyone for your feedback. We understand and agree that this is an important issue, that's why it is still open. On the other hand, we don't have an ETA for when we'll be able to get to it. If people would like to help this happen sooner than we can get to it, we would be very interested in a well-written pull request.

    Because the above message keeps getting lost in the chatter and since there is nothing new being said here, I'm going to lock the issue for further comments.

  29. locked as too heated and limited conversation to collaborators on Jun 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions