unblevable / quick-scope

Lightning fast left-right movement in Vim
MIT License
1.43k stars 54 forks source link

Removes code causing cursor bug in Linux console #45

Closed pappasam closed 5 years ago

pappasam commented 5 years ago

tl;dr this pull request resolves a bug where quick-scope causes the terminal cursor to change permanently, contrary to user-defined settings, in certain environments

I've removed code that tampers with the global cursor, both in GUI mode and in console mode. Specifically, these settings cause a bug in a 16 bit console terminal that permanently changes the cursor from an underline to a block. This bug lasts after Vim is exited.

Additionally, despite the noble effort to hide the cursor, the present solution (that I've removed) relies too much (my opinion) on global state being coordinated between function calls. I think the plugin's overall design is more elegant without this code.

Finally, I do not find a visible cursor annoying. If the reviewer finds a visible cursor unpalatable, we should probably still merge this pull request (since it causes an unrecoverable bug when using quick-scope in Console mode) and brainstorm more elegant solutions to the problem.

Thanks for this great plugin @unblevable ; it's made Vim that much more enjoyable for me.

bradford-smith94 commented 5 years ago

In my testing I don't actually notice a difference between this PR and current behavior. Perhaps I'm not testing thoroughly enough or the cursor options don't actually affect my terminal. Either way I'm going to agree with you and merge this anyway, we can revisit the issue if the cursor options actually affect someone.

Thanks for the PR.