diff src/testdir/test_popup.vim @ 13331:1ba4f926247c v8.0.1540

patch 8.0.1540: popup menu positioning fails with longer string commit https://github.com/vim/vim/commit/2b10bcbfc1c025bf7e6358326ee70105e7d30e96 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 24 21:25:44 2018 +0100 patch 8.0.1540: popup menu positioning fails with longer string Problem: Popup menu positioning fails with longer string. Solution: Only align with right side of window when width is less than 'pumwidth' (closes #2661)
author Christian Brabandt <cb@256bit.org>
date Sat, 24 Feb 2018 21:30:05 +0100
parents 424321d6eea7
children de69701e0592
line wrap: on
line diff
--- a/src/testdir/test_popup.vim
+++ b/src/testdir/test_popup.vim
@@ -772,6 +772,15 @@ func Test_popup_position()
   call term_sendkeys(buf, "GA\<C-N>")
   call VerifyScreenDump(buf, 'Test_popup_position_03', {'rows': 8})
 
+  " completed text wider than the window and 'pumwidth' smaller than available
+  " space
+  call term_sendkeys(buf, "\<Esc>u")
+  call term_sendkeys(buf, ":set pumwidth=20\<CR>")
+  call term_sendkeys(buf, "ggI123456789_\<Esc>")
+  call term_sendkeys(buf, "jI123456789_\<Esc>")
+  call term_sendkeys(buf, "GA\<C-N>")
+  call VerifyScreenDump(buf, 'Test_popup_position_04', {'rows': 10})
+  
   call term_sendkeys(buf, "\<Esc>u")
   call StopVimInTerminal(buf)
   call delete('Xtest')