summaryrefslogtreecommitdiff
path: root/src/testdir/test_viminfo.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-08-14 19:08:45 +0200
committerBram Moolenaar <Bram@vim.org>2016-08-14 19:08:45 +0200
commite59215c7dcae17b03daf39517560cfaa03314f5a (patch)
tree6c0a732a4d16d50668db89ea7d5a8f2cd8d35884 /src/testdir/test_viminfo.vim
parente56132bb4167f8b6ea4814cc2c99a71df3d07ff8 (diff)
downloadvim-git-e59215c7dcae17b03daf39517560cfaa03314f5a.tar.gz
patch 7.4.2212v7.4.2212
Problem: Mark " is not set when closing a window in another tab. (Guraga) Solution: Check all tabs for the window to be valid. (based on patch by Hirohito Higashi, closes #974)
Diffstat (limited to 'src/testdir/test_viminfo.vim')
-rw-r--r--src/testdir/test_viminfo.vim30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/testdir/test_viminfo.vim b/src/testdir/test_viminfo.vim
index 4c4935b92..cbe481c59 100644
--- a/src/testdir/test_viminfo.vim
+++ b/src/testdir/test_viminfo.vim
@@ -425,3 +425,33 @@ func Test_viminfo_file_marks()
call delete('Xviminfo')
endfunc
+
+func Test_viminfo_file_mark_tabclose()
+ tabnew Xtestfileintab
+ call setline(1, ['a','b','c','d','e'])
+ 4
+ q!
+ wviminfo Xviminfo
+ sp Xviminfo
+ /^> .*Xtestfileintab
+ let lnum = line('.')
+ while 1
+ if lnum == line('$')
+ call assert_false(1, 'mark not found in Xtestfileintab')
+ break
+ endif
+ let lnum += 1
+ let line = getline(lnum)
+ if line == ''
+ call assert_false(1, 'mark not found in Xtestfileintab')
+ break
+ endif
+ if line =~ "^\t\""
+ call assert_equal('4', substitute(line, ".*\"\t\\(\\d\\).*", '\1', ''))
+ break
+ endif
+ endwhile
+
+ call delete('Xviminfo')
+ silent! bwipe Xtestfileintab
+endfunc