Mercurial > vim
comparison src/testdir/test_mapping.vim @ 28686:141fb1d233ba v8.2.4867
patch 8.2.4867: listing of mapping with K_SPECIAL is wrong
Commit: https://github.com/vim/vim/commit/ac402f4d64bec6b6efd809fef52f5b34627bf947
Author: zeertzjq <zeertzjq@outlook.com>
Date: Wed May 4 18:51:43 2022 +0100
patch 8.2.4867: listing of mapping with K_SPECIAL is wrong
Problem: Listing of mapping with K_SPECIAL is wrong.
Solution: Adjust escaping of special characters. (closes https://github.com/vim/vim/issues/10351)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 04 May 2022 20:00:03 +0200 |
parents | 53c608c7ea9e |
children | fea88e555652 |
comparison
equal
deleted
inserted
replaced
28685:9d93cac8b406 | 28686:141fb1d233ba |
---|---|
479 \ execute('nmap ,n')->trim()->split("\n")) | 479 \ execute('nmap ,n')->trim()->split("\n")) |
480 | 480 |
481 " verbose map | 481 " verbose map |
482 call assert_match("\tLast set from .*/test_mapping.vim line \\d\\+$", | 482 call assert_match("\tLast set from .*/test_mapping.vim line \\d\\+$", |
483 \ execute('verbose map ,n')->trim()->split("\n")[1]) | 483 \ execute('verbose map ,n')->trim()->split("\n")[1]) |
484 | |
485 " character with K_SPECIAL byte in rhs | |
486 nmap foo … | |
487 call assert_equal(['n foo …'], | |
488 \ execute('nmap foo')->trim()->split("\n")) | |
489 | |
490 " modified character with K_SPECIAL byte in rhs | |
491 nmap foo <M-…> | |
492 call assert_equal(['n foo <M-…>'], | |
493 \ execute('nmap foo')->trim()->split("\n")) | |
494 | |
495 " character with K_SPECIAL byte in lhs | |
496 nmap … foo | |
497 call assert_equal(['n … foo'], | |
498 \ execute('nmap …')->trim()->split("\n")) | |
499 | |
500 " modified character with K_SPECIAL byte in lhs | |
501 nmap <M-…> foo | |
502 call assert_equal(['n <M-…> foo'], | |
503 \ execute('nmap <M-…>')->trim()->split("\n")) | |
484 | 504 |
485 " map to CTRL-V | 505 " map to CTRL-V |
486 exe "nmap ,k \<C-V>" | 506 exe "nmap ,k \<C-V>" |
487 call assert_equal(['n ,k <Nop>'], | 507 call assert_equal(['n ,k <Nop>'], |
488 \ execute('nmap ,k')->trim()->split("\n")) | 508 \ execute('nmap ,k')->trim()->split("\n")) |