diff src/testdir/test_popupwin.vim @ 22429:909ce065e99a v8.2.1763

patch 8.2.1763: Vim9: cannot use "true" for popup window scrollbar option Commit: https://github.com/vim/vim/commit/6c542f77eba73a95447f285149b3fcb011aa9675 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Sep 27 21:16:45 2020 +0200 patch 8.2.1763: Vim9: cannot use "true" for popup window scrollbar option Problem: Vim9: cannot use "true" for popup window scrollbar option. Solution: use dict_get_bool(). (closes https://github.com/vim/vim/issues/7029)
author Bram Moolenaar <Bram@vim.org>
date Sun, 27 Sep 2020 21:30:07 +0200
parents 3351d2cd3f1f
children 166a0f17b05e
line wrap: on
line diff
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -2168,6 +2168,21 @@ func Test_popup_scrollbar()
       endif
     endfunc
 
+    def CreatePopup(text: list<string>)
+      popup_create(text, #{
+	    \ minwidth: 30,
+	    \ maxwidth: 30,
+	    \ minheight: 4,
+	    \ maxheight: 4,
+	    \ firstline: 1,
+	    \ lastline: 4,
+	    \ wrap: true,
+	    \ scrollbar: true,
+	    \ mapping: false,
+	    \ filter: Popup_filter,
+	    \ })
+    enddef
+
     func PopupScroll()
       call popup_clear()
       let text =<< trim END
@@ -2179,18 +2194,7 @@ func Test_popup_scrollbar()
 	  long line long line long line long line long line long line
 	  long line long line long line long line long line long line
       END
-      call popup_create(text, #{
-	    \ minwidth: 30,
-	    \ maxwidth: 30,
-	    \ minheight: 4,
-	    \ maxheight: 4,
-	    \ firstline: 1,
-	    \ lastline: 4,
-	    \ wrap: v:true,
-	    \ scrollbar: v:true,
-	    \ mapping: v:false,
-	    \ filter: funcref('Popup_filter')
-	    \ })
+      call CreatePopup(text)
     endfunc
     map <silent> <F3> :call test_setmouse(5, 36)<CR>
     map <silent> <F4> :call test_setmouse(4, 42)<CR>