-
Notifications
You must be signed in to change notification settings - Fork 137
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
#92 causes right-to-left text when commenting #105
Comments
@russellshackleford That is quite the error... What version of vim or neovim are you using? |
@rodjek Sorry, I meant to add that. It is the standard vim with ubuntu-14.04.
|
hello! I'm trying to reproduce this in vim 8.1 in debian sid and I'm not seeing the same behaviour than described -- or maybe I misunderstood how to reproduce it? |
Oh wow, I missed something in the vimrc.:
This shows the error for me. Removing either of those 2 lines from .vimrc and the error goes away. |
I can confirm this issue on VIM 7.4, CentOS 6.10 final. The suggested workaround (moving format.vim) works for me. |
I self-compiled 7.4 on an ubuntu-18-04 host. I created the .vim and .vimrc as above. I was able to reproduce on puppet files that had modelines. If I remove any one of: the modeline itself, the |
7.4.658 (vim/vim@0f8dd84) is where the breakage stops due to changes in how And 5043a88#diff-869892d8f079089b97f27957fbbc1aafR15 adds the use of @mandos, would you have any idea how to make your change work for < 7.4.658 without breaking 658 and later? |
I have this issue with all text entry in "*.pp" files, not just comments, presumably (given the discussion) because I have weird formatoptions settings. I'm on Oracle Linux 6 (basically: RHEL 6), vim 7.4.629 It is sufficient to comment out this line:
This presumably breaks indenting, but it does fix the problem. |
Also encountered this issue. Maybe not en entirely truthful fix, but did build vim from latest https://github.com/vim/vim/archive/master.zip on centos 7, and this seems to be working fine |
with vim 8, I can see text inversion happening with the last two characters when formatexpr is called (when going beyond textwidth). I would tend to believe that if formatexpr is called too often as the vim commit pointed out by @russellshackleford suggests, it would manifest as inverting all text. fwiw, some recent changes with regards to From what I could see, the problem is caused by a call to So.... we need to find a way to replace that call to |
I've been thinking about this problem (and been very annoyed by it over time) and I don't know of a good way to solve this while keeping the current functionality. one way to fix this would be to constrain the while to me this makes more sense in terms of useability (e.g. let ppl format things how they want them, but give a tool to get more standardized placement easily), removing the autoformatting during input might annoy other folks. What do ppl think? remove autoformatting during anything but normal mode? or rather try to fix this somehow (and actually, how?) |
I sent a pull request to implement what I had described in my last comment here. If ppl experiencing this issue can test #136 it would help me build confidence in the fix |
I just merged the pull request to disable autoformat on insert mode while typing. it was causing a similar character reversing issue when i was hitting the so I believe that if folks are still running the affected vim 7.4 versions, updating to current master should calm this problem down |
Git bisect got me to 5043a88. Removing format.vim prevented the error. I don't know enough vimscript to narrow it down further. I'll try my best to describe what is happening.
What I typed
# This text is backwards
What is shown:
sdrawkcabs it xets ihT#
<letter><space>
seems to be LTR and everything else is RTL. Here's a key by key entry and what it looks like. signifies that the first space I entered stays as a trailing space for the duration.Type #, get
#
Type space, get
#<space>
Type T, get (everything else after this should be self-evident as to what I typed)
T#<space>
hT#<space>
ihT#<space>
sihT#<space>
s ihT#<space>
ts ihT#<space>
ets ihT#<space>
xets ihT#<space>
txets ihT#<space>
t xets ihT#<space>
it xets ihT#<space>
sit xets ihT#<space>
s it xets ihT#<space>
bs it xets ihT#<space>
abs it xets ihT#<space>
I removed all vim plugins and used a very stripped down vimrc to confirm.
The text was updated successfully, but these errors were encountered: