Open HenryHu opened 7 years ago
Can you give me detail reproduction steps or something useful to debug this issue?
You can use :profile command too.
I can't share the file to you, but I can show you how to reproduce it:
profile.txt cannot be empty. maybe you didn't stop profiling or something. See :h profile
okay, I missed :profile file and profile func The profile log is at http://chopapp.com/#wpyokmkm
can you upload the file to gist? it's too slow to see.
This can be easily reproduced by pasting from system clipboard into vim in a terminal emulator. Once incsearch is activated, hitting CMD-V on OS X only inserts the first character in system clipboard.
Thanks. so the problem might be here
https://gist.github.com/HenryHu/ddd7389d926d4030a4bd20b751f7064d#file-profile-txt-L11613
FUNCTION <SNR>103__execute_search()
Called 32 times
Total time: 1.218723
Self time: 1.218723
count total (s) self (s)
" :nohlsearch
" Please do not highlight at the first place if you set back
" info! I'll handle it myself :h function-search-undo
31 1.125498 execute s:keeppattern 'keepjumps' 'normal!' a:cmd | nohlsearch
It executes builtin search command. I'm not sure but search command itself could be slow on large file.
hitting CMD-V on OS X only inserts the first character in system clipboard.
Do you use incsearch.vim at the latest version??? it won't happen in linux.
@haya14busa I found out that this issue can be reliably reproduced on vim 8.0-p512 by either pasting or typing really fast, while the system provided vim 7.4-p898 works just fine.
Thank!
https://github.com/vim/vim/commit/1572e30607e9a3bee9750242bf37168f7d2b6e66 (vim 8.0-p512) seems it might be related with this issue. Do you test it with the patch?
I tested on latest in linux but I cannot reproduce it.
I'm using vim 8.0.0427 on ArchLinux. If you think that the patch 512 fixes the issue, I would test after arch updates its package.
Patch 512 did not fix the problem as I have stated above. Since @HenryHu is using ArchLinux and I'm using OS X, I think this issue is also OS independent.
I will do a bisect later to find out the exact version of vim that introduced this issue.
I will do a bisect later to find out the exact version of vim that introduced this issue.
Thanks!
@haya14busa I could not isolate @HenryHu's issue with any specific version of vim. Now I think pasting and typing fast are actually two different problems, so I have opened #131.
When using incsearch in a large file and I type fast, some keys are missing. If I type slowly, all the keys are there. It seems like that the plugin causes vim to lag behind and miss keys. The internal incsearch feature does not have this problem.