From 8062e6ff88247e434890dfdfcc25ae293dafc257 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Mon, 1 Jul 2019 22:54:50 -0400 Subject: [PATCH 1/4] vim-patch:8.1.1614: 'numberwidth' can only go up to 10 Problem: 'numberwidth' can only go up to 10. Solution: Allow up to 20. (Charlie Stanton, closes vim/vim#4584) https://github.com/vim/vim/commit/f8a071265535b8cc43e50a81f4d5049883ca50e4 --- runtime/doc/options.txt | 2 +- src/nvim/option.c | 2 +- src/nvim/screen.c | 2 +- src/nvim/testdir/test_options.vim | 2 +- test/functional/options/num_options_spec.lua | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 7c9ad3010e..a421f6b5e7 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -4202,7 +4202,7 @@ A jump table for the options with a short description can be found at |Q_op|. rows in the window, depending on whether 'number' or 'relativenumber' is set. Thus with the Vim default of 4 there is room for a line number up to 999. When the buffer has 1000 lines five columns will be used. - The minimum value is 1, the maximum value is 10. + The minimum value is 1, the maximum value is 20. *'omnifunc'* *'ofu'* 'omnifunc' 'ofu' string (default: empty) diff --git a/src/nvim/option.c b/src/nvim/option.c index e8e246c277..62f736ea31 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -4274,7 +4274,7 @@ static char *set_num_option(int opt_idx, char_u *varp, long value, } else if (pp == &curwin->w_p_nuw || pp == &curwin->w_allbuf_opt.wo_nuw) { if (value < 1) { errmsg = e_positive; - } else if (value > 10) { + } else if (value > 20) { errmsg = e_invarg; } } else if (pp == &curbuf->b_p_iminsert || pp == &p_iminsert) { diff --git a/src/nvim/screen.c b/src/nvim/screen.c index acff44164f..846ffeb442 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -2085,7 +2085,7 @@ win_line ( int lcs_eol_one = wp->w_p_lcs_chars.eol; // 'eol' until it's been used int lcs_prec_todo = wp->w_p_lcs_chars.prec; // 'prec' until it's been used - /* saved "extra" items for when draw_state becomes WL_LINE (again) */ + // saved "extra" items for when draw_state becomes WL_LINE (again) int saved_n_extra = 0; char_u *saved_p_extra = NULL; int saved_c_extra = 0; diff --git a/src/nvim/testdir/test_options.vim b/src/nvim/testdir/test_options.vim index 28576709a3..a6ebd7b023 100644 --- a/src/nvim/testdir/test_options.vim +++ b/src/nvim/testdir/test_options.vim @@ -231,7 +231,7 @@ func Test_set_errors() call assert_fails('set backupcopy=', 'E474:') call assert_fails('set regexpengine=3', 'E474:') call assert_fails('set history=10001', 'E474:') - call assert_fails('set numberwidth=11', 'E474:') + call assert_fails('set numberwidth=21', 'E474:') call assert_fails('set colorcolumn=-a') call assert_fails('set colorcolumn=a') call assert_fails('set colorcolumn=1,') diff --git a/test/functional/options/num_options_spec.lua b/test/functional/options/num_options_spec.lua index 88e554c86f..deda5c9118 100644 --- a/test/functional/options/num_options_spec.lua +++ b/test/functional/options/num_options_spec.lua @@ -74,7 +74,7 @@ describe(':set validation', function() should_fail('foldlevel', -5, 'E487') should_fail('foldcolumn', 13, 'E474') should_fail('conceallevel', 4, 'E474') - should_fail('numberwidth', 11, 'E474') + should_fail('numberwidth', 21, 'E474') should_fail('numberwidth', 0, 'E487') -- If smaller than 1 this one is set to 'lines'-1 From 18ce2d30390e3f7292f615f150b31612163cffbe Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Thu, 4 Jul 2019 21:03:53 -0400 Subject: [PATCH 2/4] vim-patch:8.1.1632: build with EXITFREE but without +arabic fails Problem: Build with EXITFREE but without +arabic fails. Solution: Rename the function and adjust #ifdefs. (closes vim/vim#4613) https://github.com/vim/vim/commit/48ac671fe5cb5a7c2d5263d2f122e5e903022e30 --- src/nvim/ex_getln.c | 2 +- src/nvim/memory.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index 1f258985a6..093067894f 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -2495,7 +2495,7 @@ static void realloc_cmdbuff(int len) static char_u *arshape_buf = NULL; # if defined(EXITFREE) -void free_cmdline_buf(void) +void free_arshape_buf(void) { xfree(arshape_buf); } diff --git a/src/nvim/memory.c b/src/nvim/memory.c index dced03f3d5..1384aa177b 100644 --- a/src/nvim/memory.c +++ b/src/nvim/memory.c @@ -648,7 +648,7 @@ void free_all_mem(void) // Free all option values. Must come after closing windows. free_all_options(); - free_cmdline_buf(); + free_arshape_buf(); /* Clear registers. */ clear_registers(); From 255d18908944f3362517fe9e0ba61c4b3359dbeb Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Thu, 4 Jul 2019 21:08:47 -0400 Subject: [PATCH 3/4] vim-patch:8.1.1634: terminal test fails when term_getansicolors() is missing Problem: Terminal test fails when term_getansicolors() is missing. Diff test fails without +rightleft. (Dominique Pelle) Solution: Check if term_getansicolors() is supported. (closes vim/vim#4597) https://github.com/vim/vim/commit/981d9dc8f3d7a470eb3be7ba60fe1c1f31e7f470 --- src/nvim/testdir/test_diffmode.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/nvim/testdir/test_diffmode.vim b/src/nvim/testdir/test_diffmode.vim index 00f4563f3d..1ba36ca8e9 100644 --- a/src/nvim/testdir/test_diffmode.vim +++ b/src/nvim/testdir/test_diffmode.vim @@ -752,6 +752,9 @@ func Test_diff_of_diff() if !CanRunVimInTerminal() return endif + if !has("rightleft") + throw 'Skipped: rightleft not supported' + endif call writefile([ \ 'call setline(1, ["aa","bb","cc","@@ -3,2 +5,7 @@","dd","ee","ff"])', From 6f924880c73e0906d29faee95d1a85c201fa556e Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Fri, 5 Jul 2019 22:12:11 -0400 Subject: [PATCH 4/4] vim-patch:8.1.1639: changing an autoload name into a file name is inefficient Problem: Changing an autoload name into a script file name is inefficient. Solution: Remember the last replaced #. (Ozaki Kiichi, closes vim/vim#4618) https://github.com/vim/vim/commit/28fc247f8d94a1cfabbcf2691ca942bde96f6d2f --- src/nvim/eval.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 1935478f15..e39d5d3c0d 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -22025,6 +22025,7 @@ static bool script_autoload(const char *const name, const size_t name_len, } /// Return the autoload script name for a function or variable name +/// Caller must make sure that "name" contains AUTOLOAD_CHAR. /// /// @param[in] name Variable/function name. /// @param[in] name_len Name length.