aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/testdir/Makefile1
-rw-r--r--src/nvim/testdir/test_changelist.in22
-rw-r--r--src/nvim/testdir/test_changelist.ok1
-rw-r--r--src/nvim/version.c2
-rw-r--r--src/nvim/window.c3
5 files changed, 28 insertions, 1 deletions
diff --git a/src/nvim/testdir/Makefile b/src/nvim/testdir/Makefile
index 81dc49e800..9f04f880b5 100644
--- a/src/nvim/testdir/Makefile
+++ b/src/nvim/testdir/Makefile
@@ -33,6 +33,7 @@ SCRIPTS := test_autoformat_join.out \
test106.out test107.out \
test_options.out \
test_listlbr.out test_listlbr_utf8.out \
+ test_changelist.out \
test_breakindent.out \
test_insertcount.out
diff --git a/src/nvim/testdir/test_changelist.in b/src/nvim/testdir/test_changelist.in
new file mode 100644
index 0000000000..6c7c4306c3
--- /dev/null
+++ b/src/nvim/testdir/test_changelist.in
@@ -0,0 +1,22 @@
+Test changelist position after splitting window
+Set 'undolevels' to make changelist for sourced file
+
+STARTTEST
+:so small.vim
+Gkylp:set ul=100
+Gylp:set ul=100
+gg
+:vsplit
+:try
+: normal g;
+: normal ggVGcpass
+:catch
+: normal ggVGcfail
+:finally
+: %w! test.out
+:endtry
+:qa!
+ENDTEST
+
+1
+2
diff --git a/src/nvim/testdir/test_changelist.ok b/src/nvim/testdir/test_changelist.ok
new file mode 100644
index 0000000000..2ae28399f5
--- /dev/null
+++ b/src/nvim/testdir/test_changelist.ok
@@ -0,0 +1 @@
+pass
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 5a0b01df28..51012bd69f 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -242,7 +242,7 @@ static int included_patches[] = {
//389,
388,
387,
- //386,
+ 386,
//385,
//384 NA
383,
diff --git a/src/nvim/window.c b/src/nvim/window.c
index ebce53cdf4..5ed145573d 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -948,6 +948,9 @@ int win_split_ins(int size, int flags, win_T *new_wp, int dir)
p_wh = size;
}
+ // Keep same changelist position in new window.
+ wp->w_changelistidx = oldwin->w_changelistidx;
+
/*
* make the new window the current window
*/