From 29db365e4c15196e5f075f423436459d208ff42a Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 2 Feb 2019 07:37:26 -0500 Subject: vim-patch:8.0.1045: running tests may pollute shell history Problem: Running tests may pollute shell history. (Manuel Ortega) Solution: Make $HISTFILE empty. https://github.com/vim/vim/commit/6a8691d483914606213a24356a9124fa41c93b69 --- src/nvim/testdir/setup.vim | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/nvim/testdir/setup.vim b/src/nvim/testdir/setup.vim index c7c3b378cc..011433f19e 100644 --- a/src/nvim/testdir/setup.vim +++ b/src/nvim/testdir/setup.vim @@ -24,6 +24,9 @@ let $NVIM_LOG_FILE = exists($NVIM_LOG_FILE) ? $NVIM_LOG_FILE : 'Xnvim.log' set rtp=$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after let &packpath = &rtp +" Avoid storing shell history. +let $HISTFILE = "" + " Make sure $HOME does not get read or written. let $HOME = expand(getcwd() . '/XfakeHOME') if !isdirectory($HOME) -- cgit From c1ef241390247cd8a4f7b3ed7a390ac6f4357c88 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 2 Feb 2019 07:44:20 -0500 Subject: vim-patch:8.0.1073: may get an endless loop if 'statusline' changes a highlight Problem: May get an endless loop if 'statusline' changes a highlight. Solution: Do not let evaluating 'statusline' trigger a redraw. https://github.com/vim/vim/commit/ba2929b6afd2fc20479912a8dec789be26a38244 --- src/nvim/buffer.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 7b90cbe4f4..802eba06a5 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -3224,6 +3224,9 @@ int build_stl_str_hl( #define TMPLEN 70 char_u tmp[TMPLEN]; char_u *usefmt = fmt; + const int save_must_redraw = must_redraw; + const int save_redr_type = curwin->w_redr_type; + const int save_highlight_shcnaged = need_highlight_changed; // When the format starts with "%!" then evaluate it as an expression and // use the result as the actual format string. @@ -3632,16 +3635,16 @@ int build_stl_str_hl( vim_snprintf((char *)tmp, sizeof(tmp), "%d", curbuf->b_fnum); set_internal_string_var((char_u *)"g:actual_curbuf", tmp); - buf_T *o_curbuf = curbuf; - win_T *o_curwin = curwin; + buf_T *const save_curbuf = curbuf; + win_T *const save_curwin = curwin; curwin = wp; curbuf = wp->w_buffer; // Note: The result stored in `t` is unused. str = eval_to_string_safe(out_p, &t, use_sandbox); - curwin = o_curwin; - curbuf = o_curbuf; + curwin = save_curwin; + curbuf = save_curbuf; // Remove the variable we just stored do_unlet(S_LEN("g:actual_curbuf"), true); @@ -4262,6 +4265,13 @@ int build_stl_str_hl( cur_tab_rec->def.func = NULL; } + // We do not want redrawing a stausline, ruler, title, etc. to trigger + // another redraw, it may cause an endless loop. This happens when a + // statusline changes a highlight group. + must_redraw = save_must_redraw; + curwin->w_redr_type = save_redr_type; + need_highlight_changed = save_highlight_shcnaged; + return width; } -- cgit From 5a40abe2d599b67af3afa319cf89932824438a6f Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 3 Feb 2019 09:04:47 -0500 Subject: vim-patch:8.0.1114: default for 'iminsert' is annoying Problem: Default for 'iminsert' is annoying. Solution: Make the default always zero. (Yasuhiro Matsumoto, closes vim/vim#2071) https://github.com/vim/vim/commit/4cf56bbc85f77846aeb378cfb071677336dfad6d --- src/nvim/options.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/nvim/options.lua b/src/nvim/options.lua index c3aff87bbf..222ec5457b 100644 --- a/src/nvim/options.lua +++ b/src/nvim/options.lua @@ -1173,9 +1173,7 @@ return { vi_def=true, varname='p_iminsert', pv_name='p_imi', defaults={ - condition='B_IMODE_IM', - if_true={vi=macros('B_IMODE_IM')}, - if_false={vi=macros('B_IMODE_NONE')}, + if_true={vi=macros('B_IMODE_NONE')}, } }, { @@ -1184,9 +1182,7 @@ return { vi_def=true, varname='p_imsearch', pv_name='p_ims', defaults={ - condition='B_IMODE_IM', - if_true={vi=macros('B_IMODE_IM')}, - if_false={vi=macros('B_IMODE_NONE')}, + if_true={vi=macros('B_IMODE_USE_INSERT')}, } }, { -- cgit