Mercurial > vim
diff src/testdir/test_tabline.vim @ 29841:b37b74ea8dee v9.0.0259
patch 9.0.0259: crash with mouse click when not initialized
Commit: https://github.com/vim/vim/commit/80525751c5ce9ed82c41d83faf9ef38667bf61b1
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Aug 24 19:27:45 2022 +0100
patch 9.0.0259: crash with mouse click when not initialized
Problem: Crash with mouse click when not initialized.
Solution: Check TabPageIdxs[] is not NULL.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 24 Aug 2022 20:30:03 +0200 |
parents | fa675efa1e75 |
children | c8ebe35b2475 |
line wrap: on
line diff
--- a/src/testdir/test_tabline.vim +++ b/src/testdir/test_tabline.vim @@ -147,4 +147,18 @@ func Test_tabline_20_format_items_no_ove set showtabline& tabline& endfunc +func Test_mouse_click_in_tab() + " This used to crash because TabPageIdxs[] was not initialized + let lines =<< trim END + tabnew + set mouse=a + exe "norm \<LeftMouse>" + END + call writefile(lines, 'Xclickscript') + call RunVim([], [], "-e -s -S Xclickscript -c qa") + + call delete('Xclickscript') +endfunc + + " vim: shiftwidth=2 sts=2 expandtab