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

Undocumented (possibly incorrect) behavior for Virtual Replace mode #12045

Closed
pierreganty opened this issue Feb 22, 2023 · 4 comments
Closed
Labels

Comments

@pierreganty
Copy link
Contributor

Steps to reproduce

Type gr<C-o> or gr<C-g> from Normal mode. It enters Virtual Replace mode( same as if we had typed gR).

Expected behaviour

I am not claiming the behavior is wrong. However I could not find documentation for the behavior.
Asking on the vim IRC channel I got the following input from @puremourning :
bug-vim

Version of Vim

9.0

Environment

Macs OS 13.2 on terminal.app, zsh

Logs and stack traces

No response

@puremourning
Copy link
Contributor

Bram please forgive my flippancy on IRC, I wasn't expecting my comments to be posted here verbatim.

@pierreganty
Copy link
Contributor Author

@puremourning sorry about that.

@brammool
Copy link
Contributor

Well, the help for "gr" says that you are supposed to type a character, but you type something that is a command in Insert mode. I can try to fix it anyway.

@pierreganty
Copy link
Contributor Author

pierreganty commented Feb 24, 2023

Thank you. For the record, the patch fixes the case gr<C-o> but it does not fix gr<C-g> which still allows to get in Virtual Replace Mode.

brammool added a commit that referenced this issue Feb 25, 2023
Problem:    "gr CTRL-G" stays in virtual replace mode. (Pierre Ganty)
Solution:   Prepend CTRL-V before control characters. (closes #12045)
zeertzjq added a commit to zeertzjq/neovim that referenced this issue Feb 26, 2023
Problem:    "gr CTRL-G" stays in virtual replace mode. (Pierre Ganty)
Solution:   Prepend CTRL-V before control characters. (closes vim/vim#12045)

vim/vim@d6a4ea3

Cherry-pick Test_edit_gr_special() from patch 9.0.1347.

Co-authored-by: Bram Moolenaar <[email protected]>
zeertzjq added a commit to zeertzjq/neovim that referenced this issue Feb 26, 2023
Problem:    "gr CTRL-G" stays in virtual replace mode. (Pierre Ganty)
Solution:   Prepend CTRL-V before control characters. (closes vim/vim#12045)

vim/vim@d6a4ea3

Cherry-pick Test_edit_gr_special() from patch 9.0.1347.

Co-authored-by: Bram Moolenaar <[email protected]>
zeertzjq added a commit to zeertzjq/neovim that referenced this issue Feb 26, 2023
Problem:    Cannot cancel "gr" with Esc.
Solution:   Make "gr<Esc>" do nothing. (closes vim/vim#12064)

vim/vim@4f026ea

N/A patches for version.c:

vim-patch:9.0.1347: "gr CTRL-O" stays in Insert mode

Problem:    "gr CTRL-O" stays in Insert mode. (Pierre Ganty)
Solution:   Do not set restart_edit when "cmdchar" is 'v'. (closes vim/vim#12045)

vim/vim@2824d1e

vim-patch:9.0.1349: "gr" with a count fails

Problem:    "gr" with a count fails.
Solution:   Break out of the loop only after using the count.

vim/vim@3ddb118
yesean pushed a commit to yesean/neovim that referenced this issue Mar 25, 2023
Problem:    "gr CTRL-G" stays in virtual replace mode. (Pierre Ganty)
Solution:   Prepend CTRL-V before control characters. (closes vim/vim#12045)

vim/vim@d6a4ea3

Cherry-pick Test_edit_gr_special() from patch 9.0.1347.

Co-authored-by: Bram Moolenaar <[email protected]>
yesean pushed a commit to yesean/neovim that referenced this issue Mar 25, 2023
Problem:    Cannot cancel "gr" with Esc.
Solution:   Make "gr<Esc>" do nothing. (closes vim/vim#12064)

vim/vim@4f026ea

N/A patches for version.c:

vim-patch:9.0.1347: "gr CTRL-O" stays in Insert mode

Problem:    "gr CTRL-O" stays in Insert mode. (Pierre Ganty)
Solution:   Do not set restart_edit when "cmdchar" is 'v'. (closes vim/vim#12045)

vim/vim@2824d1e

vim-patch:9.0.1349: "gr" with a count fails

Problem:    "gr" with a count fails.
Solution:   Break out of the loop only after using the count.

vim/vim@3ddb118
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants