comparison src/getchar.c @ 30098:5b4f3129cadc v9.0.0385

patch 9.0.0385: GUI: when CTRL-D is mapped in Insert mode it gets inserted Commit: https://github.com/vim/vim/commit/c47b16a47063735413ebe3885604c4460f724246 Author: zeertzjq <zeertzjq@outlook.com> Date: Mon Sep 5 13:05:29 2022 +0100 patch 9.0.0385: GUI: when CTRL-D is mapped in Insert mode it gets inserted Problem: GUI: when CTRL-D is mapped in Insert mode it gets inserted. (Yasuhiro Matsumoto) Solution: Also recognize modifier starting with CSI. (closes #11057)
author Bram Moolenaar <Bram@vim.org>
date Mon, 05 Sep 2022 14:15:04 +0200
parents bb0e525e1393
children 539fb427124d
comparison
equal deleted inserted replaced
30097:6a519b687eb4 30098:5b4f3129cadc
2354 for (offset = 0; offset < max_offset; ++offset) 2354 for (offset = 0; offset < max_offset; ++offset)
2355 { 2355 {
2356 if (offset + 3 >= typebuf.tb_len) 2356 if (offset + 3 >= typebuf.tb_len)
2357 break; 2357 break;
2358 tp = typebuf.tb_buf + typebuf.tb_off + offset; 2358 tp = typebuf.tb_buf + typebuf.tb_off + offset;
2359 if (tp[0] == K_SPECIAL && tp[1] == KS_MODIFIER) 2359 if ((tp[0] == K_SPECIAL || tp[0] == CSI) && tp[1] == KS_MODIFIER)
2360 { 2360 {
2361 // A modifier was not used for a mapping, apply it to ASCII keys. 2361 // A modifier was not used for a mapping, apply it to ASCII keys.
2362 // Shift would already have been applied. 2362 // Shift would already have been applied.
2363 int modifier = tp[2]; 2363 int modifier = tp[2];
2364 int c = tp[3]; 2364 int c = tp[3];