Mercurial > vim
view src/testdir/test_menu.vim @ 15396:325e4a8ba1b6 v8.1.0706
patch 8.1.0706: tabline is not always redrawn
commit https://github.com/vim/vim/commit/e12bab3144af8943937bd0ff4bc57f04e53037b3
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jan 8 22:02:56 2019 +0100
patch 8.1.0706: tabline is not always redrawn
Problem: Tabline is not always redrawn when something that is used in
'tabline' changes.
Solution: Add ":redrawtabline" so that a plugin can at least cause the
redraw when needed.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 08 Jan 2019 22:15:05 +0100 |
parents | 405309f9dd13 |
children | 822d00007b34 |
line wrap: on
line source
" Test that the system menu can be loaded. if !has('menu') finish endif func Test_load_menu() try source $VIMRUNTIME/menu.vim catch call assert_report('error while loading menus: ' . v:exception) endtry call assert_match('browse confirm w', execute(':menu File.Save')) source $VIMRUNTIME/delmenu.vim endfunc func Test_translate_menu() if !has('multi_lang') return endif if !filereadable($VIMRUNTIME . '/lang/menu_de_de.latin1.vim') throw 'Skipped: translated menu not found' endif " First delete any English menus. source $VIMRUNTIME/delmenu.vim set langmenu=de_de source $VIMRUNTIME/menu.vim call assert_match('browse confirm w', execute(':menu Datei.Speichern')) source $VIMRUNTIME/delmenu.vim endfunc func Test_menu_commands() nmenu 2 Test.FooBar :let g:did_menu = 'normal'<CR> vmenu 2 Test.FooBar :let g:did_menu = 'visual'<CR> smenu 2 Test.FooBar :let g:did_menu = 'select'<CR> omenu 2 Test.FooBar :let g:did_menu = 'op-pending'<CR> tlmenu 2 Test.FooBar :let g:did_menu = 'terminal'<CR> imenu 2 Test.FooBar :let g:did_menu = 'insert'<CR> cmenu 2 Test.FooBar :let g:did_menu = 'cmdline'<CR> emenu n Test.FooBar call assert_equal('normal', g:did_menu) emenu v Test.FooBar call assert_equal('visual', g:did_menu) emenu s Test.FooBar call assert_equal('select', g:did_menu) emenu o Test.FooBar call assert_equal('op-pending', g:did_menu) emenu t Test.FooBar call assert_equal('terminal', g:did_menu) emenu i Test.FooBar call assert_equal('insert', g:did_menu) emenu c Test.FooBar call assert_equal('cmdline', g:did_menu) aunmenu Test.FooBar tlunmenu Test.FooBar call assert_fails('emenu n Test.FooBar', 'E334:') nmenu 2 Test.FooBar.Child :let g:did_menu = 'foobar'<CR> call assert_fails('emenu n Test.FooBar', 'E333:') nunmenu Test.FooBar.Child unlet g:did_menu endfun