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

Bufexplorer interferes with the startinsert! command #87

Open
cespare opened this issue Dec 31, 2019 · 0 comments
Open

Bufexplorer interferes with the startinsert! command #87

cespare opened this issue Dec 31, 2019 · 0 comments

Comments

@cespare
Copy link

cespare commented Dec 31, 2019

I'm seeing a strange issue that I've isolated to bufexplorer. (That is, it does not occur without bufexplorer loaded, and it does occur with an empty .vimrc and bufexplorer as the single plugin.)

This started happening with more recent vim versions. It does not reproduce in vim 8.0.1453 but it does occur in vim 8.1.something (can't recall which patch) as well as 8.2.65.

Edit any file with at least one line of text. I'll call mine x.txt.

Consider the command

1 | startinsert!

This should go to the first line and then change to insert mode at the very end of the line (as though the user had used the A motion).

This command works fine. However, if at the command-line I run

vim -c '1 | startinsert!' x.txt

then the cursor will be at the second-to-last position in the line rather than at the very end (as though the user typed $i rather than A).

Without bufexplorer loaded, vim -c '1 | startinsert!' x.txt starts vim with the cursor at the very end of the first line, just as though I ran 1 | startinsert! from inside vim.

I did a little bisecting and the problem is caused by this line of code:

silent execute 'normal! ' . tab . 'gt'

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

1 participant