Mercurial > vim
comparison src/testdir/test_mapping.vim @ 31241:ee50174810ac v9.0.0954
patch 9.0.0954: cannot detect whether modifyOtherKeys is enabled
Commit: https://github.com/vim/vim/commit/c255b789653120979eacdf8bb8eca02487753a8e
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Nov 26 19:16:48 2022 +0000
patch 9.0.0954: cannot detect whether modifyOtherKeys is enabled
Problem: Cannot detect whether modifyOtherKeys is enabled.
Solution: Use XTQMODKEYS introduced by xterm version 377 to request the
modifyOtherKeys level. Update the keycode check results.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 26 Nov 2022 20:30:03 +0100 |
parents | 6a2b04cd0213 |
children | fbc4d3b0302d |
comparison
equal
deleted
inserted
replaced
31240:9779faf6478c | 31241:ee50174810ac |
---|---|
476 nmap ,n <Nop> | 476 nmap ,n <Nop> |
477 call assert_equal(['n ,n <Nop>'], | 477 call assert_equal(['n ,n <Nop>'], |
478 \ execute('nmap ,n')->trim()->split("\n")) | 478 \ execute('nmap ,n')->trim()->split("\n")) |
479 | 479 |
480 " verbose map | 480 " verbose map |
481 " first line might be "seen modifyOtherKeys" | |
482 let lines = execute('verbose map ,n')->trim()->split("\n") | 481 let lines = execute('verbose map ,n')->trim()->split("\n") |
482 | |
483 " Remove "Seen modifyOtherKeys" and other optional info. | |
484 if lines[0] =~ 'Seen modifyOtherKeys' | |
485 call remove(lines, 0) | |
486 endif | |
487 if lines[0] =~ 'modifyOtherKeys detected:' | |
488 call remove(lines, 0) | |
489 endif | |
490 if lines[0] =~ 'Kitty keyboard protocol:' | |
491 call remove(lines, 0) | |
492 endif | |
493 if lines[0] == '' | |
494 call remove(lines, 0) | |
495 endif | |
496 | |
483 let index = indexof(lines, 'v:val =~ "Last set"') | 497 let index = indexof(lines, 'v:val =~ "Last set"') |
484 call assert_inrange(1, 2, index) | 498 call assert_equal(1, index) |
485 call assert_match("\tLast set from .*/test_mapping.vim line \\d\\+$", | 499 call assert_match("\tLast set from .*/test_mapping.vim line \\d\\+$", |
486 \ lines[index]) | 500 \ lines[index]) |
487 | 501 |
488 " character with K_SPECIAL byte in rhs | 502 " character with K_SPECIAL byte in rhs |
489 nmap foo … | 503 nmap foo … |