Skip to content

Conversation

Shougo
Copy link
Contributor

@Shougo Shougo commented Sep 5, 2016

  • Add compl_busy set in complete()
  • Ignore folding update if foldmethod is "expr" or "sytax" and in insert mode like FastFold plugin

@phuongnd08 Please test it.

Note: I will send PR for Vim, too.

@justinmk
Copy link
Member

justinmk commented Sep 5, 2016

I will send PR for Vim, too.

Can you send it there first? Reviewing this and adding tests for it won't be a good use of our time if we have to merge back whatever changes happen upstream.

@justinmk justinmk added the has:vim-patch issue is fixed in vim and patch needs to be ported label Sep 5, 2016
@Shougo
Copy link
Contributor Author

Shougo commented Sep 6, 2016

I sent to vim_dev.

vim/vim#1045

@Shougo
Copy link
Contributor Author

Shougo commented Sep 14, 2016

I think the folding update should be ignored in insert mode.

@justinmk
Copy link
Member

👍

@Shougo
Copy link
Contributor Author

Shougo commented Sep 15, 2016

OK. I will update it.

@Shougo
Copy link
Contributor Author

Shougo commented Sep 15, 2016

I have pushed. I think it is simpler and better.

@Shougo
Copy link
Contributor Author

Shougo commented Sep 15, 2016

The patch is already todo listed in Vim.
https://github.com/vim/vim/blob/3c4ebeba17399e4ef33d004c269e667f696f0eb6/runtime/doc/todo.txt#L181

So, I think it is [RDY].

@Shougo
Copy link
Contributor Author

Shougo commented Sep 15, 2016

I have removed compl_busy changes.
It seems no means.

@@ -762,7 +762,7 @@ void clearFolding(win_T *win)
*/
void foldUpdate(win_T *wp, linenr_T top, linenr_T bot)
{
if (compl_busy) {
if (State & INSERT) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd feel better if this was compl_busy || (State & INSERT)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? compl_busy is set in insert mode. So no means.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It probably doesn't matter currently, but compl_busy could be used in later Vim patches to take on more meaning.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm...
OK

@justinmk justinmk added the performance performance, latency, cpu/memory usage label Sep 15, 2016
@justinmk justinmk merged commit 6e9f329 into neovim:master Sep 15, 2016
@justinmk
Copy link
Member

Oops, 045_folding_spec.lua is failing. Will you be able to check that?

@Shougo
Copy link
Contributor Author

Shougo commented Sep 16, 2016

I get the problem. I will fix it.

@Shougo Shougo deleted the fold branch September 16, 2016 19:56
@Shougo Shougo mentioned this pull request Sep 16, 2016
@Shougo
Copy link
Contributor Author

Shougo commented Sep 16, 2016

I have fix the problem.
#5351

justinmk pushed a commit that referenced this pull request Sep 18, 2016
Fixes failing test: 045_folding_spec.lua
References #5299
justinmk added a commit to justinmk/neovim that referenced this pull request Oct 27, 2016
FEATURES:
0b5a7e4 neovim#4432 API: external UIs can render custom popupmenu
c6ac4f8 neovim#4934 API: call any API method from vimscript
31df051 neovim#4568 API: nvim_call_atomic(): multiple calls in a single request
b268ba3 neovim#5424 API: nvim_win_get_number(), nvim_tabpage_get_number()
e7e2844 has("nvim-1.2.3") checks for a specific Nvim version
522b885 neovim#5295, neovim#5493 `:CheckHealth` checks tmux, terminfo, performance
719dae2 neovim#5384 events: allow event processing in getchar()
f25797f neovim#5386 API: metadata: Nvim version & API level
22dfe69 neovim#5389 API: metadata: "since", "deprecated_since"
605e743 Added QuickFixLine highlight group

CHANGES:
4af6ec7 neovim#5253 perf: Disable clipboard in do_cmdline()
6e9f329 neovim#5299 perf: Skip foldUpdate() in insert-mode.
9d4fcec neovim#5426 perf: Do not auto-update folds for some foldmethods.
eeec0ca neovim#5419 tui: Default to normal-mode cursor shape.

FIXES:
e838452 neovim#5436 tui: Fix "weird characters" / "bleeding termcodes"
10a54ad neovim#5243 signal_init: Always unblock SIGCHLD.
bccb49b neovim#5316 eval.c: Fix memory leak for detached pty job
626065d neovim#5227 tchdir: New tab should inherit CWD.
cd321b7 neovim#5292 getcwd(): Return empty string if CWD is invalid.
6127eae shada: Fix non-writeable ShaDa directory handling
ca65514 neovim#2789 system(): Respect shellxescape, shellxquote
2daf54e neovim#4874 Restore vim-like tab dragging
0c536b5 neovim#5319 syntax.c: Support bg/fg special color-names.
3c53371 neovim#4972 from justinmk/schedule-ui_refresh
68bcb32 neovim#4789 tui.c: Do not wait for tui loop on teardown.
c8b6ec2 neovim#5409 v:count broken in command-line window
6bc3bce neovim#5461 fix emoji display
51937e1 neovim#5470 fix :terminal with :argadd, :argu
79d77da neovim#5481 external UIs: opening multiple files from command-line
657ba62 neovim#5501 rplugin: resolve paths in manifest file
6a6f188 neovim#5502 system('foo &', 'bar'): Show error, don't crash.
1ff162c neovim#5515 os_nodetype: open fd with O_NONBLOCK
2a6c5bb neovim#5450 modeline: Handle version number overflow.
0ade1bb neovim#5225 CI tests now run against Windows!
justinmk added a commit to justinmk/neovim that referenced this pull request Oct 28, 2016
FEATURES:
0b5a7e4 neovim#4432 API: external UIs can render custom popupmenu
c6ac4f8 neovim#4934 API: call any API method from vimscript
31df051 neovim#4568 API: nvim_call_atomic(): multiple calls in a single request
b268ba3 neovim#5424 API: nvim_win_get_number(), nvim_tabpage_get_number()
e7e2844 has("nvim-1.2.3") checks for a specific Nvim version
522b885 neovim#5295, neovim#5493 `:CheckHealth` checks tmux, terminfo, performance
719dae2 neovim#5384 events: allow event processing in getchar()
f25797f neovim#5386 API: metadata: Nvim version & API level
22dfe69 neovim#5389 API: metadata: "since", "deprecated_since"
605e743 Added QuickFixLine highlight group

CHANGES:
4af6ec7 neovim#5253 perf: Disable clipboard in do_cmdline()
6e9f329 neovim#5299 perf: Skip foldUpdate() in insert-mode.
9d4fcec neovim#5426 perf: Do not auto-update folds for some foldmethods.
eeec0ca neovim#5419 tui: Default to normal-mode cursor shape.

FIXES:
e838452 neovim#5436 tui: Fix "weird characters" / "bleeding termcodes"
10a54ad neovim#5243 signal_init: Always unblock SIGCHLD.
bccb49b neovim#5316 eval.c: Fix memory leak for detached pty job
626065d neovim#5227 tchdir: New tab should inherit CWD.
cd321b7 neovim#5292 getcwd(): Return empty string if CWD is invalid.
6127eae shada: Fix non-writeable ShaDa directory handling
ca65514 neovim#2789 system(): Respect shellxescape, shellxquote
2daf54e neovim#4874 Restore vim-like tab dragging
0c536b5 neovim#5319 syntax.c: Support bg/fg special color-names.
3c53371 neovim#4972 from justinmk/schedule-ui_refresh
68bcb32 neovim#4789 tui.c: Do not wait for tui loop on teardown.
c8b6ec2 neovim#5409 v:count broken in command-line window
6bc3bce neovim#5461 fix emoji display
51937e1 neovim#5470 fix :terminal with :argadd, :argu
79d77da neovim#5481 external UIs: opening multiple files from command-line
657ba62 neovim#5501 rplugin: resolve paths in manifest file
6a6f188 neovim#5502 system('foo &', 'bar'): Show error, don't crash.
1ff162c neovim#5515 os_nodetype: open fd with O_NONBLOCK
2a6c5bb neovim#5450 modeline: Handle version number overflow.
0ade1bb neovim#5225 CI tests now run against Windows!
justinmk added a commit to justinmk/neovim that referenced this pull request Mar 3, 2017
justinmk added a commit to justinmk/neovim that referenced this pull request Mar 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has:vim-patch issue is fixed in vim and patch needs to be ported performance performance, latency, cpu/memory usage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants