view src/testdir/test_winbar.vim @ 15521:6d949e552e99 v8.1.0768

patch 8.1.0768: updating completions may cause the popup menu to flicker commit https://github.com/vim/vim/commit/ae654385dfb2ae4c1d70789d1dce3676dba4dfbc Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jan 17 21:09:05 2019 +0100 patch 8.1.0768: updating completions may cause the popup menu to flicker Problem: Updating completions may cause the popup menu to flicker. Solution: Avoid updating the text below the popup menu before drawing the popup menu.
author Bram Moolenaar <Bram@vim.org>
date Thu, 17 Jan 2019 21:15:06 +0100
parents 3f16cf18386c
children a147acab726f
line wrap: on
line source

" Test WinBar

if !has('menu')
  finish
endif

func Test_add_remove_menu()
  new
  amenu 1.10 WinBar.Next :let g:did_next = 11<CR>
  amenu 1.20 WinBar.Cont :let g:did_cont = 12<CR>
  emenu WinBar.Next
  call assert_equal(11, g:did_next)
  emenu WinBar.Cont
  call assert_equal(12, g:did_cont)

  wincmd w
  call assert_fails('emenu WinBar.Next', 'E334')
  wincmd p

  aunmenu WinBar.Next
  aunmenu WinBar.Cont
  close
endfunc