Closed davidzchen closed 11 years ago
Ok, I tested this and it doesn't seem to completely work. Entering visual mode actually works as expected, but when you hit Esc to get out of it, the color remains purple and doesn't reset until next time you hit an insert/visual mode command. So you end up moving around in normal mode while the bar is still purple. :(
I reverted the changes to keep things sane. I think another mapping is needed on the Esc key but that might cause isssues elsewhere.
That's interesting. I'm not seeing this behavior on my machine; there is a delay after exiting visual mode, just as there is when exiting insert mode, but I don't see NORMAL with a purple background. Are you running terminal vim or gvim? And which version? I'll take a look into this tonight. Thanks!
I had that issue in Gvim 7.3.46.
I was able to reproduce it consistently in Gvim 7.3 as well. So far, this issue only appears in Gvim but not terminal vim. I will work on a fix and will send a pull request when ready. Thanks for your help!
This issue seems to be finally fixed. The visual line colors now work both in vim and gvim as well as macvim.
Does that mean that it was a bug in GVim?
No, not really. It was the changes in 1e9a9b490d57e5a0a37eb6c85c7e9c0ba7d3c17f that fixed it (sans the typos that commit introduced to the color definitions of course).
Ahh didn't see your commit at first. Looks awesome. Thanks!
I have added code to fix mode color changes for visual mode. Unfortunately, there are no convenient events like InsertEnter/InsertExit for visual mode, and the only way to fire an event to change the mode color for visual mode is by tweaking the key mappings to change the mode color upon visual mode enter/exit.