diff options
-rw-r--r-- | runtime/ftplugin/man.vim | 2 | ||||
-rw-r--r-- | src/nvim/buffer.c | 8 | ||||
-rw-r--r-- | src/nvim/normal.c | 5 | ||||
-rw-r--r-- | src/nvim/testdir/test_alot.vim | 1 | ||||
-rw-r--r-- | src/nvim/testdir/test_goto.vim | 10 | ||||
-rw-r--r-- | src/nvim/testdir/test_tabpage.vim | 11 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
7 files changed, 29 insertions, 10 deletions
diff --git a/runtime/ftplugin/man.vim b/runtime/ftplugin/man.vim index b8acd901a8..63bafa1925 100644 --- a/runtime/ftplugin/man.vim +++ b/runtime/ftplugin/man.vim @@ -1,7 +1,7 @@ " Maintainer: Anmol Sethi <anmol@aubble.com> " Previous Maintainer: SungHyun Nam <goweol@gmail.com> -if exists('b:did_ftplugin') +if exists('b:did_ftplugin') || &filetype !=# 'man' finish endif let b:did_ftplugin = 1 diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 8e6066453c..80db0e2ebc 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -4149,12 +4149,10 @@ do_arg_all ( wpnext = wp->w_next; buf = wp->w_buffer; if (buf->b_ffname == NULL - || (!keep_tabs && buf->b_nwindows > 1) - || wp->w_width != Columns - ) + || (!keep_tabs && (buf->b_nwindows > 1 || wp->w_width != Columns))) { i = opened_len; - else { - /* check if the buffer in this window is in the arglist */ + } else { + // check if the buffer in this window is in the arglist for (i = 0; i < opened_len; ++i) { if (i < alist->al_ga.ga_len && (AARGLIST(alist)[i].ae_fnum == buf->b_fnum diff --git a/src/nvim/normal.c b/src/nvim/normal.c index 76e3829bee..312777d3b9 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -3646,10 +3646,11 @@ nv_gd ( size_t len; char_u *ptr; if ((len = find_ident_under_cursor(&ptr, FIND_IDENT)) == 0 - || !find_decl(ptr, len, nchar == 'd', thisblock, 0)) + || !find_decl(ptr, len, nchar == 'd', thisblock, SEARCH_START)) { clearopbeep(oap); - else if ((fdo_flags & FDO_SEARCH) && KeyTyped && oap->op_type == OP_NOP) + } else if ((fdo_flags & FDO_SEARCH) && KeyTyped && oap->op_type == OP_NOP) { foldOpenCursor(); + } } /* diff --git a/src/nvim/testdir/test_alot.vim b/src/nvim/testdir/test_alot.vim index 083f57aec1..c9d7b332e4 100644 --- a/src/nvim/testdir/test_alot.vim +++ b/src/nvim/testdir/test_alot.vim @@ -8,6 +8,7 @@ source test_ex_undo.vim source test_expr.vim source test_expr_utf8.vim source test_feedkeys.vim +source test_goto.vim source test_menu.vim source test_messages.vim source test_options.vim diff --git a/src/nvim/testdir/test_goto.vim b/src/nvim/testdir/test_goto.vim new file mode 100644 index 0000000000..fb8f190fa6 --- /dev/null +++ b/src/nvim/testdir/test_goto.vim @@ -0,0 +1,10 @@ +" Test commands that jump somewhere. + +func Test_geedee() + new + call setline(1, ["Filename x;", "", "int Filename", "int func() {", "Filename y;"]) + /y;/ + normal gD + call assert_equal(1, line('.')) + quit! +endfunc diff --git a/src/nvim/testdir/test_tabpage.vim b/src/nvim/testdir/test_tabpage.vim index 0bf7d056de..7c3039ba24 100644 --- a/src/nvim/testdir/test_tabpage.vim +++ b/src/nvim/testdir/test_tabpage.vim @@ -40,7 +40,7 @@ function Test_tabpage() call assert_true(t:val_num == 100 && t:val_str == 'SetTabVar test' && t:val_list == ['red', 'blue', 'green']) tabclose - if has('gui') || has('clientserver') + if has('nvim') || has('gui') || has('clientserver') " Test for ":tab drop exist-file" to keep current window. sp test1 tab drop test1 @@ -64,6 +64,15 @@ function Test_tabpage() call assert_true(tabpagenr() == 2 && tabpagewinnr(2, '$') == 2 && tabpagewinnr(2) == 1) tabclose q + " + " + " Test for ":tab drop vertical-split-window" to jump test1 buffer + tabedit test1 + vnew + tabfirst + tab drop test1 + call assert_equal([2, 2, 2, 2], [tabpagenr('$'), tabpagenr(), tabpagewinnr(2, '$'), tabpagewinnr(2)]) + 1tabonly endif " " diff --git a/src/nvim/version.c b/src/nvim/version.c index 05855ee385..29e7990b1b 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -696,7 +696,7 @@ static int included_patches[] = { // 1751, // 1750 NA // 1749 NA - // 1748, + 1748, // 1747 NA // 1746 NA // 1745 NA |