diff options
-rw-r--r-- | src/nvim/edit.c | 1 | ||||
-rw-r--r-- | src/nvim/eval.c | 2 | ||||
-rw-r--r-- | src/nvim/ex_docmd.c | 3 | ||||
-rw-r--r-- | src/nvim/screen.c | 8 | ||||
-rw-r--r-- | src/nvim/syntax.c | 4 | ||||
-rw-r--r-- | src/nvim/testdir/Makefile | 1 | ||||
-rw-r--r-- | src/nvim/testdir/test_alot.vim | 1 | ||||
-rw-r--r-- | src/nvim/testdir/test_expr.vim | 15 | ||||
-rw-r--r-- | src/nvim/version.c | 8 | ||||
-rw-r--r-- | test/functional/legacy/060_exists_and_has_functions_spec.lua | 16 |
10 files changed, 34 insertions, 25 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index dcb772e23c..9d07878f24 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -2322,7 +2322,6 @@ static int ins_compl_make_cyclic(void) return count; } - // Set variables that store noselect and noinsert behavior from the // 'completeopt' value. void completeopt_was_set(void) diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 750ef4f94f..fc2f435508 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -10658,7 +10658,7 @@ static void f_has(typval_T *argvars, typval_T *rettv, FunPtr fptr) if (!n) { if (STRNICMP(name, "patch", 5) == 0) { if (name[5] == '-' - && strlen(name) > 11 + && strlen(name) >= 11 && ascii_isdigit(name[6]) && ascii_isdigit(name[8]) && ascii_isdigit(name[10])) { diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 76dddf874d..23b1a50fc8 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -7970,7 +7970,8 @@ static void ex_startinsert(exarg_T *eap) static void ex_stopinsert(exarg_T *eap) { restart_edit = 0; - stop_insert_mode = TRUE; + stop_insert_mode = true; + clearmode(); } /* diff --git a/src/nvim/screen.c b/src/nvim/screen.c index cee3c62f43..5bf743c4df 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -6827,12 +6827,18 @@ void unshowmode(bool force) if (!redrawing() || (!force && char_avail() && !KeyTyped)) { redraw_cmdline = true; // delete mode later } else { + clearmode(); + } +} + +// Clear the mode message. +void clearmode(void) +{ msg_pos_mode(); if (Recording) { recording_mode(hl_attr(HLF_CM)); } msg_clr_eos(); - } } static void recording_mode(int attr) diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c index e57965ac2c..cd37bde3cb 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -392,7 +392,9 @@ void syntax_start(win_T *wp, linenr_T lnum) * Also do this when a change was made, the current state may be invalid * then. */ - if (syn_block != wp->w_s || changedtick != syn_buf->b_changedtick) { + if (syn_block != wp->w_s + || syn_buf != wp->w_buffer + || changedtick != syn_buf->b_changedtick) { invalidate_current_state(); syn_buf = wp->w_buffer; syn_block = wp->w_s; diff --git a/src/nvim/testdir/Makefile b/src/nvim/testdir/Makefile index 67e7c97905..c6e9c26c57 100644 --- a/src/nvim/testdir/Makefile +++ b/src/nvim/testdir/Makefile @@ -32,6 +32,7 @@ SCRIPTS := \ # Keep test_alot*.res as the last one, sort the others. NEW_TESTS = \ test_cscope.res \ + test_cmdline.res \ test_hardcopy.res \ test_help_tagjump.res \ test_history.res \ diff --git a/src/nvim/testdir/test_alot.vim b/src/nvim/testdir/test_alot.vim index 156604051d..4e8cd54ce3 100644 --- a/src/nvim/testdir/test_alot.vim +++ b/src/nvim/testdir/test_alot.vim @@ -8,7 +8,6 @@ source test_ex_undo.vim source test_expr.vim source test_expr_utf8.vim source test_feedkeys.vim -source test_cmdline.vim source test_menu.vim source test_options.vim source test_popup.vim diff --git a/src/nvim/testdir/test_expr.vim b/src/nvim/testdir/test_expr.vim index 7ea4ebc7df..83b5e66fe0 100644 --- a/src/nvim/testdir/test_expr.vim +++ b/src/nvim/testdir/test_expr.vim @@ -1,5 +1,20 @@ " Tests for expressions. +func Test_version() + call assert_true(has('patch-7.4.001')) + call assert_true(has('patch-7.4.01')) + call assert_true(has('patch-7.4.1')) + call assert_true(has('patch-6.9.999')) + call assert_true(has('patch-7.1.999')) + call assert_true(has('patch-7.4.123')) + + call assert_false(has('patch-7')) + call assert_false(has('patch-7.4')) + call assert_false(has('patch-7.4.')) + call assert_false(has('patch-9.1.0')) + call assert_false(has('patch-9.9.1')) +endfunc + func Test_strgetchar() call assert_equal(char2nr('a'), strgetchar('axb', 0)) call assert_equal(char2nr('x'), strgetchar('axb', 1)) diff --git a/src/nvim/version.c b/src/nvim/version.c index f7dacb17df..5bcda0bedf 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -519,7 +519,7 @@ static int included_patches[] = { // 1926 NA // 1925 NA // 1924 NA - // 1923, + 1923, // 1922 NA // 1921 NA // 1920 NA @@ -748,12 +748,12 @@ static int included_patches[] = { // 1699, // 1698 NA 1697, - // 1696, + 1696, 1695, // 1694 NA // 1693 NA // 1692, - // 1691, + 1691, // 1690 NA // 1689 NA // 1688 NA @@ -784,7 +784,7 @@ static int included_patches[] = { 1663, // 1662 NA // 1661 NA - // 1660, + 1660, // 1659 NA 1658, // 1657 NA diff --git a/test/functional/legacy/060_exists_and_has_functions_spec.lua b/test/functional/legacy/060_exists_and_has_functions_spec.lua index cbd857c524..3e99f6df57 100644 --- a/test/functional/legacy/060_exists_and_has_functions_spec.lua +++ b/test/functional/legacy/060_exists_and_has_functions_spec.lua @@ -638,15 +638,6 @@ describe('exists() and has() functions', function() call TestExists() - function TestHas() - redir >> test.out - for pl in ['6.9.999', '7.1.999', '7.4.123', '9.1.0', '9.9.1'] - echo 'has patch ' . pl . ': ' . has('patch-' . pl) - endfor - redir END - endfunc - call TestHas() - edit! test.out set ff=unix ]=]) @@ -858,12 +849,7 @@ describe('exists() and has() functions', function() OK g:footest#x = 1 footest#F() 0 - UndefFun() 0 - has patch 6.9.999: 1 - has patch 7.1.999: 1 - has patch 7.4.123: 1 - has patch 9.1.0: 0 - has patch 9.9.1: 0]]) + UndefFun() 0]]) end) end) |