comparison src/testdir/test_cursorline.vim @ 27626:95d6e3c9aa1e v8.2.4339

patch 8.2.4339: CTRL-A does not work properly with the cmdline popup menu Commit: https://github.com/vim/vim/commit/560dff49c0095111fc96b4b8dd7f4d269aba9473 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Thu Feb 10 19:52:10 2022 +0000 patch 8.2.4339: CTRL-A does not work properly with the cmdline popup menu Problem: CTRL-A does not work properly with the cmdline popup menu. Solution: Fix issues with CTRL-A. Add more tests for the cmdline popup menu. Remove TermWait() before VeriryScreenDump(). Refactor the cmdline popup code. (Yegappan Lakshmanan, closes #9735)
author Bram Moolenaar <Bram@vim.org>
date Thu, 10 Feb 2022 21:00:04 +0100
parents b04e76e66128
children 373f1afadfa3
comparison
equal deleted inserted replaced
27625:bba604950a7e 27626:95d6e3c9aa1e
134 call extend(lines, ["call append(0, ".. string(file_content).. ')']) 134 call extend(lines, ["call append(0, ".. string(file_content).. ')'])
135 call extend(lines, lines2) 135 call extend(lines, lines2)
136 call writefile(lines, filename) 136 call writefile(lines, filename)
137 " basic test 137 " basic test
138 let buf = RunVimInTerminal('-S '. filename, #{rows: 20}) 138 let buf = RunVimInTerminal('-S '. filename, #{rows: 20})
139 call TermWait(buf)
140 call VerifyScreenDump(buf, 'Test_'. filename. '_1', {}) 139 call VerifyScreenDump(buf, 'Test_'. filename. '_1', {})
141 call term_sendkeys(buf, "fagj") 140 call term_sendkeys(buf, "fagj")
142 call TermWait(buf)
143 call VerifyScreenDump(buf, 'Test_'. filename. '_2', {}) 141 call VerifyScreenDump(buf, 'Test_'. filename. '_2', {})
144 call term_sendkeys(buf, "gj") 142 call term_sendkeys(buf, "gj")
145 call TermWait(buf)
146 call VerifyScreenDump(buf, 'Test_'. filename. '_3', {}) 143 call VerifyScreenDump(buf, 'Test_'. filename. '_3', {})
147 call term_sendkeys(buf, "gj") 144 call term_sendkeys(buf, "gj")
148 call TermWait(buf)
149 call VerifyScreenDump(buf, 'Test_'. filename. '_4', {}) 145 call VerifyScreenDump(buf, 'Test_'. filename. '_4', {})
150 call term_sendkeys(buf, "gj") 146 call term_sendkeys(buf, "gj")
151 call TermWait(buf)
152 call VerifyScreenDump(buf, 'Test_'. filename. '_5', {}) 147 call VerifyScreenDump(buf, 'Test_'. filename. '_5', {})
153 call term_sendkeys(buf, "gj") 148 call term_sendkeys(buf, "gj")
154 call TermWait(buf)
155 call VerifyScreenDump(buf, 'Test_'. filename. '_6', {}) 149 call VerifyScreenDump(buf, 'Test_'. filename. '_6', {})
156 " test with set list and cursorlineopt containing number 150 " test with set list and cursorlineopt containing number
157 call term_sendkeys(buf, "gg0") 151 call term_sendkeys(buf, "gg0")
158 call term_sendkeys(buf, ":set list cursorlineopt+=number listchars=space:-\<cr>") 152 call term_sendkeys(buf, ":set list cursorlineopt+=number listchars=space:-\<cr>")
159 call VerifyScreenDump(buf, 'Test_'. filename. '_7', {}) 153 call VerifyScreenDump(buf, 'Test_'. filename. '_7', {})
160 call term_sendkeys(buf, "fagj") 154 call term_sendkeys(buf, "fagj")
161 call TermWait(buf)
162 call VerifyScreenDump(buf, 'Test_'. filename. '_8', {}) 155 call VerifyScreenDump(buf, 'Test_'. filename. '_8', {})
163 call term_sendkeys(buf, "gj") 156 call term_sendkeys(buf, "gj")
164 call TermWait(buf)
165 call VerifyScreenDump(buf, 'Test_'. filename. '_9', {}) 157 call VerifyScreenDump(buf, 'Test_'. filename. '_9', {})
166 call term_sendkeys(buf, "gj") 158 call term_sendkeys(buf, "gj")
167 call TermWait(buf)
168 call VerifyScreenDump(buf, 'Test_'. filename. '_10', {}) 159 call VerifyScreenDump(buf, 'Test_'. filename. '_10', {})
169 call term_sendkeys(buf, "gj") 160 call term_sendkeys(buf, "gj")
170 call TermWait(buf)
171 call VerifyScreenDump(buf, 'Test_'. filename. '_11', {}) 161 call VerifyScreenDump(buf, 'Test_'. filename. '_11', {})
172 call term_sendkeys(buf, "gj") 162 call term_sendkeys(buf, "gj")
173 call TermWait(buf)
174 call VerifyScreenDump(buf, 'Test_'. filename. '_12', {}) 163 call VerifyScreenDump(buf, 'Test_'. filename. '_12', {})
175 if exists("+foldcolumn") && exists("+signcolumn") && exists("+breakindent") 164 if exists("+foldcolumn") && exists("+signcolumn") && exists("+breakindent")
176 " test with set foldcolumn signcoloumn and breakindent 165 " test with set foldcolumn signcoloumn and breakindent
177 call term_sendkeys(buf, "gg0") 166 call term_sendkeys(buf, "gg0")
178 call term_sendkeys(buf, ":set breakindent foldcolumn=2 signcolumn=yes\<cr>") 167 call term_sendkeys(buf, ":set breakindent foldcolumn=2 signcolumn=yes\<cr>")
179 call VerifyScreenDump(buf, 'Test_'. filename. '_13', {}) 168 call VerifyScreenDump(buf, 'Test_'. filename. '_13', {})
180 call term_sendkeys(buf, "fagj") 169 call term_sendkeys(buf, "fagj")
181 call TermWait(buf)
182 call VerifyScreenDump(buf, 'Test_'. filename. '_14', {}) 170 call VerifyScreenDump(buf, 'Test_'. filename. '_14', {})
183 call term_sendkeys(buf, "gj") 171 call term_sendkeys(buf, "gj")
184 call TermWait(buf)
185 call VerifyScreenDump(buf, 'Test_'. filename. '_15', {}) 172 call VerifyScreenDump(buf, 'Test_'. filename. '_15', {})
186 call term_sendkeys(buf, "gj") 173 call term_sendkeys(buf, "gj")
187 call TermWait(buf)
188 call VerifyScreenDump(buf, 'Test_'. filename. '_16', {}) 174 call VerifyScreenDump(buf, 'Test_'. filename. '_16', {})
189 call term_sendkeys(buf, "gj") 175 call term_sendkeys(buf, "gj")
190 call TermWait(buf)
191 call VerifyScreenDump(buf, 'Test_'. filename. '_17', {}) 176 call VerifyScreenDump(buf, 'Test_'. filename. '_17', {})
192 call term_sendkeys(buf, "gj") 177 call term_sendkeys(buf, "gj")
193 call TermWait(buf)
194 call VerifyScreenDump(buf, 'Test_'. filename. '_18', {}) 178 call VerifyScreenDump(buf, 'Test_'. filename. '_18', {})
195 call term_sendkeys(buf, ":set breakindent& foldcolumn& signcolumn&\<cr>") 179 call term_sendkeys(buf, ":set breakindent& foldcolumn& signcolumn&\<cr>")
196 endif 180 endif
197 " showbreak should not be highlighted with CursorLine when 'number' is off 181 " showbreak should not be highlighted with CursorLine when 'number' is off
198 call term_sendkeys(buf, "gg0") 182 call term_sendkeys(buf, "gg0")
199 call term_sendkeys(buf, ":set list cursorlineopt=screenline listchars=space:-\<cr>") 183 call term_sendkeys(buf, ":set list cursorlineopt=screenline listchars=space:-\<cr>")
200 call term_sendkeys(buf, ":set nonumber\<cr>") 184 call term_sendkeys(buf, ":set nonumber\<cr>")
201 call VerifyScreenDump(buf, 'Test_'. filename. '_19', {}) 185 call VerifyScreenDump(buf, 'Test_'. filename. '_19', {})
202 call term_sendkeys(buf, "fagj") 186 call term_sendkeys(buf, "fagj")
203 call TermWait(buf)
204 call VerifyScreenDump(buf, 'Test_'. filename. '_20', {}) 187 call VerifyScreenDump(buf, 'Test_'. filename. '_20', {})
205 call term_sendkeys(buf, "gj") 188 call term_sendkeys(buf, "gj")
206 call TermWait(buf)
207 call VerifyScreenDump(buf, 'Test_'. filename. '_21', {}) 189 call VerifyScreenDump(buf, 'Test_'. filename. '_21', {})
208 call term_sendkeys(buf, "gj") 190 call term_sendkeys(buf, "gj")
209 call TermWait(buf)
210 call VerifyScreenDump(buf, 'Test_'. filename. '_22', {}) 191 call VerifyScreenDump(buf, 'Test_'. filename. '_22', {})
211 call term_sendkeys(buf, "gj") 192 call term_sendkeys(buf, "gj")
212 call TermWait(buf)
213 call VerifyScreenDump(buf, 'Test_'. filename. '_23', {}) 193 call VerifyScreenDump(buf, 'Test_'. filename. '_23', {})
214 call term_sendkeys(buf, "gj") 194 call term_sendkeys(buf, "gj")
215 call TermWait(buf)
216 call VerifyScreenDump(buf, 'Test_'. filename. '_24', {}) 195 call VerifyScreenDump(buf, 'Test_'. filename. '_24', {})
217 call term_sendkeys(buf, ":set list& cursorlineopt& listchars&\<cr>") 196 call term_sendkeys(buf, ":set list& cursorlineopt& listchars&\<cr>")
218 197
219 call StopVimInTerminal(buf) 198 call StopVimInTerminal(buf)
220 call delete(filename) 199 call delete(filename)