Mercurial > vim
comparison src/testdir/test_utf8.vim @ 34692:f8f45612de4e v9.1.0227
patch 9.1.0227: Recording may still be wrong in Select mode
Commit: https://github.com/vim/vim/commit/ea95f1a5ad2455c7fd1eee2413ac7a3460ef4f8a
Author: zeertzjq <zeertzjq@outlook.com>
Date: Fri Mar 29 10:11:42 2024 +0100
patch 9.1.0227: Recording may still be wrong in Select mode
Problem: Recording may still be wrong in Select mode (after 8.2.3993).
Solution: Make sure a character isn't split between two buffer blocks.
(zeertzjq)
closes: #14326
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 29 Mar 2024 10:15:08 +0100 |
parents | 695b50472e85 |
children | 8f3fc2bcb321 |
comparison
equal
deleted
inserted
replaced
34691:4e5721fb12d6 | 34692:f8f45612de4e |
---|---|
290 s/x/\=nr2char(1629)/g | 290 s/x/\=nr2char(1629)/g |
291 print | 291 print |
292 bwipe! | 292 bwipe! |
293 endfunc | 293 endfunc |
294 | 294 |
295 func Test_recording_with_select_mode_utf8() | |
296 call Run_test_recording_with_select_mode_utf8() | |
297 endfunc | |
298 | |
299 func Run_test_recording_with_select_mode_utf8() | |
300 new | |
301 | |
302 " No escaping | |
303 call feedkeys("qacc12345\<Esc>gH哦\<Esc>q", "tx") | |
304 call assert_equal("哦", getline(1)) | |
305 call assert_equal("cc12345\<Esc>gH哦\<Esc>", @a) | |
306 call setline(1, 'asdf') | |
307 normal! @a | |
308 call assert_equal("哦", getline(1)) | |
309 | |
310 " 固 is 0xE5 0x9B 0xBA where 0x9B is CSI | |
311 call feedkeys("qacc12345\<Esc>gH固\<Esc>q", "tx") | |
312 call assert_equal("固", getline(1)) | |
313 call assert_equal("cc12345\<Esc>gH固\<Esc>", @a) | |
314 call setline(1, 'asdf') | |
315 normal! @a | |
316 call assert_equal("固", getline(1)) | |
317 | |
318 " 四 is 0xE5 0x9B 0x9B where 0x9B is CSI | |
319 call feedkeys("qacc12345\<Esc>gH四\<Esc>q", "tx") | |
320 call assert_equal("四", getline(1)) | |
321 call assert_equal("cc12345\<Esc>gH四\<Esc>", @a) | |
322 call setline(1, 'asdf') | |
323 normal! @a | |
324 call assert_equal("四", getline(1)) | |
325 | |
326 " 倒 is 0xE5 0x80 0x92 where 0x80 is K_SPECIAL | |
327 call feedkeys("qacc12345\<Esc>gH倒\<Esc>q", "tx") | |
328 call assert_equal("倒", getline(1)) | |
329 call assert_equal("cc12345\<Esc>gH倒\<Esc>", @a) | |
330 call setline(1, 'asdf') | |
331 normal! @a | |
332 call assert_equal("倒", getline(1)) | |
333 | |
334 bwipe! | |
335 endfunc | |
336 | |
337 " This must be done as one of the last tests, because it starts the GUI, which | |
338 " cannot be undone. | |
339 func Test_zz_recording_with_select_mode_utf8_gui() | |
340 CheckCanRunGui | |
341 | |
342 gui -f | |
343 call Run_test_recording_with_select_mode_utf8() | |
344 endfunc | |
345 | |
346 " vim: shiftwidth=2 sts=2 expandtab | 295 " vim: shiftwidth=2 sts=2 expandtab |