Mercurial > vim
comparison src/getchar.c @ 23076:5fbac68bda23 v8.2.2084
patch 8.2.2084: CTRL-V U doesn't work to enter a Unicode character
Commit: https://github.com/vim/vim/commit/0684e36a7ee0743f2889698fb8e0e14f7acae423
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Dec 3 19:54:42 2020 +0100
patch 8.2.2084: CTRL-V U doesn't work to enter a Unicode character
Problem: CTRL-V U doesn't work to enter a Unicode character when
modifyOtherKeys is effective. (Ken Takata)
Solution: Add a flag to get_literal() for the shift key. (closes #7413)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 03 Dec 2020 20:00:05 +0100 |
parents | b68313ee7002 |
children | b545334ae654 |
comparison
equal
deleted
inserted
replaced
23075:fc0d222fcf36 | 23076:5fbac68bda23 |
---|---|
2578 && (typebuf.tb_maplen == 0 | 2578 && (typebuf.tb_maplen == 0 |
2579 || (p_remap && typebuf.tb_noremap[ | 2579 || (p_remap && typebuf.tb_noremap[ |
2580 typebuf.tb_off] == RM_YES)) | 2580 typebuf.tb_off] == RM_YES)) |
2581 && !*timedout) | 2581 && !*timedout) |
2582 { | 2582 { |
2583 keylen = check_termcode(max_mlen + 1, | 2583 keylen = check_termcode(max_mlen + 1, NULL, 0, NULL); |
2584 NULL, 0, NULL); | 2584 |
2585 | 2585 // If no termcode matched but 'pastetoggle' matched partially |
2586 // If no termcode matched but 'pastetoggle' matched partially it's | 2586 // it's like an incomplete key sequence. |
2587 // like an incomplete key sequence. | |
2588 if (keylen == 0 && save_keylen == KEYLEN_PART_KEY) | 2587 if (keylen == 0 && save_keylen == KEYLEN_PART_KEY) |
2589 keylen = KEYLEN_PART_KEY; | 2588 keylen = KEYLEN_PART_KEY; |
2590 | 2589 |
2591 // If no termcode matched, try to include the modifier into the | 2590 // If no termcode matched, try to include the modifier into the |
2592 // key. This for when modifyOtherKeys is working. | 2591 // key. This for when modifyOtherKeys is working. |
3678 if (c1 == Ctrl_V) | 3677 if (c1 == Ctrl_V) |
3679 { | 3678 { |
3680 // CTRL-V is followed by octal, hex or other characters, reverses | 3679 // CTRL-V is followed by octal, hex or other characters, reverses |
3681 // what AppendToRedobuffLit() does. | 3680 // what AppendToRedobuffLit() does. |
3682 no_reduce_keys = TRUE; // don't merge modifyOtherKeys | 3681 no_reduce_keys = TRUE; // don't merge modifyOtherKeys |
3683 c1 = get_literal(); | 3682 c1 = get_literal(TRUE); |
3684 no_reduce_keys = FALSE; | 3683 no_reduce_keys = FALSE; |
3685 } | 3684 } |
3686 | 3685 |
3687 if (got_int) | 3686 if (got_int) |
3688 aborted = TRUE; | 3687 aborted = TRUE; |