changeset 8923:face93b02af4 v7.4.1748

commit https://github.com/vim/vim/commit/1538fc34fae3fae39773ca43f6ff52401fce61d8 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Apr 16 09:13:34 2016 +0200 patch 7.4.1748 Problem: "gD" does not find match in first column of first line. (Gary Johnson) Solution: Accept match at the cursor.
author Christian Brabandt <cb@256bit.org>
date Sat, 16 Apr 2016 09:15:04 +0200
parents 1f9cb2eb4103
children 1c174f5abd07
files src/normal.c src/testdir/test_alot.vim src/version.c
diffstat 3 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/normal.c
+++ b/src/normal.c
@@ -4228,7 +4228,8 @@ nv_gd(
     char_u	*ptr;
 
     if ((len = find_ident_under_cursor(&ptr, FIND_IDENT)) == 0
-	    || find_decl(ptr, len, nchar == 'd', thisblock, 0) == FAIL)
+	    || find_decl(ptr, len, nchar == 'd', thisblock, SEARCH_START)
+								      == FAIL)
 	clearopbeep(oap);
 #ifdef FEAT_FOLDING
     else if ((fdo_flags & FDO_SEARCH) && KeyTyped && oap->op_type == OP_NOP)
--- a/src/testdir/test_alot.vim
+++ b/src/testdir/test_alot.vim
@@ -12,6 +12,7 @@ source test_feedkeys.vim
 source test_fnamemodify.vim
 source test_file_perm.vim
 source test_glob2regpat.vim
+source test_goto.vim
 source test_help_tagjump.vim
 source test_join.vim
 source test_lispwords.vim
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1748,
+/**/
     1747,
 /**/
     1746,