-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Accessing vim.current.window (through python-client) breaks CursorHoldI?! #3757
Comments
Just calling /cc @Shougo |
I have recently changed how cursor hold is triggered, but I can't immediately say what's causing the issue
cursorhold is triggered in the |
Also commenting this line fixes it (but breaks maybe something else?): Line 613 in a03af86
|
This does not seem to break the use case mentioned in the comment: there is no CursorHoldI event being fired after `CTRL-V` in insert mode. Ref: neovim#3757 (comment)
According to the comment, cursorhold should not trigger while processing multi-key commands such as
Close, I think the line which causes the bug is this one: e5165ba#diff-ce1f54750dd541783db1cf9a24120ba8R1221 That is because the same "special key" is used for both cursorhold and other events, and we need a way to distinguish so |
Reproduced. |
+1 for this issue. |
@tarruda It's a very subtle, but very annoying bug. |
The root cause of this issue may also affect timers: #4624 (comment) |
This appears to fix the issue where CursorHoldI is broken when used with deoplete etc (neovim/neovim#3757), and is less hackish in general.
This appears to fix the issue where CursorHoldI is broken when used with deoplete etc (neovim/neovim#3757), and is less hackish in general.
This appears to fix the issue where CursorHoldI is broken when used with deoplete etc (neovim/neovim#3757), and is less hackish in general.
This appears to fix the issue where CursorHoldI is broken when used with deoplete etc (neovim/neovim#3757), and is less hackish in general.
This appears to fix the issue where CursorHoldI is broken when used with deoplete etc (neovim/neovim#3757), and is less hackish in general.
This appears to fix the issue where CursorHoldI is broken when used with deoplete etc (neovim/neovim#3757), and is less hackish in general.
Smaller set noshowmode
set updatetime=100
let s:init = 0
function! F()
if !s:init
call timer_start(0, {-> 1})
endif
let s:init = 1
endfunction
augroup test
au CursorHoldI * echom 'CHI'
au InsertEnter * call F()
augroup END Refer to Lines 643 to 644 in c6cd608
K_EVENT prevents CursorHold events from triggering. If this is changed to
if (key != K_EVENT) {
did_cursorhold = true;
} the above What I'm worried about is the comment about |
@gelguy |
This does not seem to break the use case mentioned in the comment: there is no CursorHoldI event being fired after `CTRL-V` in insert mode. Ref: neovim#3757 (comment)
This does not seem to break the use case mentioned in the comment: there is no CursorHoldI event being fired after `CTRL-V` in insert mode. Ref: neovim#3757 (comment)
Actually with the above vimrc from @gelguy you can also see it without a timer already: it is not triggered while staying in insert mode, inserting something, and then waiting..?! I agree with @tarruda that this should likely be refactored / fixed properly by adding this to the state, and using a timer instead - OTOH the timeout in |
This appears to fix the issue where CursorHoldI is broken when used with deoplete etc (neovim/neovim#3757), and is less hackish in general.
This appears to fix the issue where CursorHoldI is broken when used with deoplete etc (neovim/neovim#3757), and is less hackish in general.
This appears to fix the issue where CursorHoldI is broken when used with deoplete etc (neovim/neovim#3757), and is less hackish in general.
This appears to fix the issue where CursorHoldI is broken when used with deoplete etc (neovim/neovim#3757), and is less hackish in general.
This appears to fix the issue where CursorHoldI is broken when used with deoplete etc (neovim/neovim#3757), and is less hackish in general.
This appears to fix the issue where CursorHoldI is broken when used with deoplete etc (neovim/neovim#3757), and is less hackish in general.
This appears to fix the issue where CursorHoldI is broken when used with deoplete etc (neovim/neovim#3757), and is less hackish in general.
This appears to fix the issue where CursorHoldI is broken when used with deoplete etc (neovim/neovim#3757), and is less hackish in general.
This appears to fix the issue where CursorHoldI is broken when used with deoplete etc (neovim/neovim#3757), and is less hackish in general.
This appears to fix the issue where CursorHoldI is broken when used with deoplete etc (neovim/neovim#3757), and is less hackish in general.
This appears to fix the issue where CursorHoldI is broken when used with deoplete etc (neovim/neovim#3757), and is less hackish in general.
This appears to fix the issue where CursorHoldI is broken when used with deoplete etc (neovim/neovim#3757), and is less hackish in general.
This appears to fix the issue where CursorHoldI is broken when used with deoplete etc (neovim/neovim#3757), and is less hackish in general.
I have found a strange bug when using deoplete, where accessing
self.vim.current.window
through a Python RPC call seems to break theCursorHoldI
handling?!See Shougo/deoplete.nvim#81 for more information and a test case (based on deoplete).
I have also tried the latest python-client from Git (https://github.com/neovim/python-client/tree/6c0ec04307442dedc851873504b379f4dcdb33a0) without success.
Why might that happen?
Where can I look further to debug this?
This breaks the feature to display call signatures (
g:jedi#show_call_signatures
) in jedi-vim.The text was updated successfully, but these errors were encountered: