Skip to content
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

New text written after using Ctrl+B is not formatted correctly #10

Open
alnafie opened this issue Feb 19, 2013 · 1 comment
Open

New text written after using Ctrl+B is not formatted correctly #10

alnafie opened this issue Feb 19, 2013 · 1 comment

Comments

@alnafie
Copy link

alnafie commented Feb 19, 2013

  1. type in Arabic text. (X)
  2. use Ctrl+B // formatted correctly
  3. type new text (Z) // formatted incorrectly
  4. use Ctrl+B // X formatted incorrectly, Z formatted correctly
@imdark
Copy link
Contributor

imdark commented May 10, 2014

I have added the ability to run the bidi only on selection (or multiple selections) as a workaround (pull request pending)
I have been thinking about this for a while now...
My main idea is to modify the bidirectional algorithm implementation used by the plugin, to support some kind of in memory representation per sublime view of text previously reversed by the plugin.
(mabe a list of words or just chars)
I can compare the new arabic/hebrew text send to the plugin when it is activated next with text previously reversed.
There are a few issues with this, when text that has already been reversed is copy-pasted only the first instance of the text can be ignored, there are similar issues with cut and pasting.
Another way to do this is to add bidi markers (such as the unicode invisible rtl chars) here there also issues of copying exsiting markers from external sources or other views.
Mabe it needs to be a combination of both and the workaround, any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants