Closed smjonas closed 2 years ago
Could this perhaps be a 0.8 issue? It seems that preview
is undefined for v0.7.2
Yes, command preview is only available on Neovim nightly (0.8). Though it has been available for about 2 months now.
Maybe this is even a Neovim issue but to report this upstream, I would first need to create minimal reproduction steps that do not directly involve this plugin. Maybe you have a hunch where it might be caused.
I'm still using v0.7.2, so I don't actually know what preview
does; I'll look into it and give my 2 cents in a bit.
Edit: Ah, incremental command preview.
Edit 2: Bug has been reproduced.
@smjonas I reckon it has to do with how the built-in vim.fn.getchar()
(used in utils.get_char()
) function works? Whenever it receives input, the cursor "moves" to the beginning of the command line, even though typing more characters after will "move" the cursor back to the end of the command line (it visually moves, but practically it stays at the end of the command line, if that makes sense).
Thank you, seems like we'll have to wait until https://github.com/neovim/neovim/pull/19035 is merged.
Glad it's already been found/reported! I'll be closing this as it seems the issue is upstream.
Checklist
main
branch?:h nvim-surround
to see if there might be any relevant information there?Describe the bug Now that #84 has been solved, I found another issue ^^
To Reproduce Create the following user command, then type
:Test ds
:Expected behavior The cursor should not move in the command line.
Actual behavior The cursor moves to the very left column in the command line:
Additional context This causes lots of flickers when typing
dssssssss
. This issue does not occur with a plugin likevim-sandwich
. So maybe the cursor is moved too early. However, I didn't look at the way cursor positions are handled in the code, so it would be nice if you could clarify a few things here.This issue does not occur with
ys
btw.