patch 9.1.0699: "dvgo" is not always an inclusive motion
Problem: "dvgo" is not always an inclusive motion
(Iain King-Speir)
Solution: initialize the inclusive flag to false
fixes: #15580
closes: #15582
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/normal.c b/src/normal.c
index a929dd8..b054005 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -6227,6 +6227,7 @@
#ifdef FEAT_BYTEOFF
// "go": goto byte count from start of buffer
case 'o':
+ oap->inclusive = FALSE;
goto_byte(cap->count0);
break;
#endif
diff --git a/src/testdir/test_normal.vim b/src/testdir/test_normal.vim
index 398bf29..adb5ce7 100644
--- a/src/testdir/test_normal.vim
+++ b/src/testdir/test_normal.vim
@@ -4281,4 +4281,17 @@
exe "normal! \<C-E>"
bwipe!
endfunc
+
+" Test for go command
+func Test_normal_go()
+ new
+ call setline(1, ['one two three four'])
+ call cursor(1, 5)
+ norm! dvgo
+ call assert_equal('wo three four', getline(1))
+ norm! ...
+ call assert_equal('three four', getline(1))
+
+ bwipe!
+endfunc
" vim: shiftwidth=2 sts=2 expandtab nofoldenable
diff --git a/src/version.c b/src/version.c
index 314a320..100a1ae 100644
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 699,
+/**/
698,
/**/
697,