diff options
author | Bram Moolenaar <Bram@vim.org> | 2023-02-27 17:18:01 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-02-27 17:18:01 +0000 |
commit | 99ad3a8bb95c6f860545a050472b6181e33bac1a (patch) | |
tree | 038ff903aeb50dc88815a9d61d2ef52bdf7140bc /src/testdir | |
parent | dd60c365cd2630794be84d63c4fe287124a30b97 (diff) |
patch 9.0.1362: ml_get error when going to another tabv9.0.1362
Problem: ml_get error when going to another tab. (Daniel J. Perry)
Solution: Do not call update_topline() if "curwin" is invalid.
(closes #11907)
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_tabpage.vim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/testdir/test_tabpage.vim b/src/testdir/test_tabpage.vim index e57a5dd0c3..83d6123cd7 100644 --- a/src/testdir/test_tabpage.vim +++ b/src/testdir/test_tabpage.vim @@ -872,4 +872,19 @@ func Test_tabpage_alloc_failure() call assert_equal(1, tabpagenr('$')) endfunc +" this was giving ml_get errors +func Test_tabpage_last_line() + enew + call setline(1, repeat(['a'], &lines + 5)) + $ + tabnew + call setline(1, repeat(['b'], &lines + 20)) + $ + tabNext + call assert_equal('a', getline('.')) + + bwipe! + bwipe! +endfunc + " vim: shiftwidth=2 sts=2 expandtab |