Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
22428:a53dee41b3f0 | 22429:909ce065e99a |
---|---|
2166 call popup_close(a:winid) | 2166 call popup_close(a:winid) |
2167 return v:true | 2167 return v:true |
2168 endif | 2168 endif |
2169 endfunc | 2169 endfunc |
2170 | 2170 |
2171 def CreatePopup(text: list<string>) | |
2172 popup_create(text, #{ | |
2173 \ minwidth: 30, | |
2174 \ maxwidth: 30, | |
2175 \ minheight: 4, | |
2176 \ maxheight: 4, | |
2177 \ firstline: 1, | |
2178 \ lastline: 4, | |
2179 \ wrap: true, | |
2180 \ scrollbar: true, | |
2181 \ mapping: false, | |
2182 \ filter: Popup_filter, | |
2183 \ }) | |
2184 enddef | |
2185 | |
2171 func PopupScroll() | 2186 func PopupScroll() |
2172 call popup_clear() | 2187 call popup_clear() |
2173 let text =<< trim END | 2188 let text =<< trim END |
2174 1 | 2189 1 |
2175 2 | 2190 2 |
2177 4 | 2192 4 |
2178 long line long line long line long line long line long line | 2193 long line long line long line long line long line long line |
2179 long line long line long line long line long line long line | 2194 long line long line long line long line long line long line |
2180 long line long line long line long line long line long line | 2195 long line long line long line long line long line long line |
2181 END | 2196 END |
2182 call popup_create(text, #{ | 2197 call CreatePopup(text) |
2183 \ minwidth: 30, | |
2184 \ maxwidth: 30, | |
2185 \ minheight: 4, | |
2186 \ maxheight: 4, | |
2187 \ firstline: 1, | |
2188 \ lastline: 4, | |
2189 \ wrap: v:true, | |
2190 \ scrollbar: v:true, | |
2191 \ mapping: v:false, | |
2192 \ filter: funcref('Popup_filter') | |
2193 \ }) | |
2194 endfunc | 2198 endfunc |
2195 map <silent> <F3> :call test_setmouse(5, 36)<CR> | 2199 map <silent> <F3> :call test_setmouse(5, 36)<CR> |
2196 map <silent> <F4> :call test_setmouse(4, 42)<CR> | 2200 map <silent> <F4> :call test_setmouse(4, 42)<CR> |
2197 map <silent> <F5> :call test_setmouse(7, 42)<CR> | 2201 map <silent> <F5> :call test_setmouse(7, 42)<CR> |
2198 END | 2202 END |