按 :Gstatus 窗口中切换文件 - 显示"Press ENTER or type command to continue"消息



我尝试了在这里和这里找到的所有内容来摆脱该消息,但无济于事。

如果我将cmdheight设置为>1,那么它可以进行几次切换,然后再次显示可怕的消息。(我可以将cmdheight设置为例如3以防止这种情况,但命令行看起来很丑)

我试图通过检查:file!值来查找使其显示消息的消息:

".git/index" [Not edited][RO] line 10 of 10 --100%-- col 1

我想这应该不是问题。

我还检查了:v:scrollstart变量:

1 # On branch master
2 # Your branch is ahead of 'origin/master' by 1 commit.
3 #
4 # Changes not staged for commit:
5 #   (use "git add <file>..." to update what will be committed)
6 #   (use "git checkout -- <file>..." to discard changes in working directory)
7 #
8 # modified:   zshrc
9 #
10 no changes added to commit (use "git add" and/or "git commit -a")

可能是这样,但我不确定。

谢谢。

我想这是键绑定。尝试:

:nnoremap - :<C-U>silent! execute <SNR>20_StageToggle(line('.'),line('.')+v:count1-1)<CR>

如果这解决了它,你需要用相应的更改更新fugitive.vim

除此之外,您还可以使用调试模式

:debug execute <SNR>20_StageToggle(line('.'),line('.')+v:count1-1)

最后,查看文件(特别是 .git/index 或 .git/index.lock)是否可以访问和写入。

相关内容

最新更新