summaryrefslogtreecommitdiff
path: root/src/misc2.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-06-01 17:13:36 +0200
committerBram Moolenaar <Bram@vim.org>2019-06-01 17:13:36 +0200
commitbf0eff0b724ebf4951f7ca82e6c648451f9f0c01 (patch)
tree3be6478692b535abb96b8fe3963137e15581b206 /src/misc2.c
parent2d247849ce612050ba1085df806746b23be1f0a3 (diff)
downloadvim-git-bf0eff0b724ebf4951f7ca82e6c648451f9f0c01.tar.gz
patch 8.1.1441: popup window filter not yet implementedv8.1.1441
Problem: Popup window filter not yet implemented. Solution: Implement the popup filter.
Diffstat (limited to 'src/misc2.c')
-rw-r--r--src/misc2.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/misc2.c b/src/misc2.c
index 69b9347bc..2ac7f5e77 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -2731,17 +2731,31 @@ get_special_key_name(int c, int modifiers)
trans_special(
char_u **srcp,
char_u *dst,
- int keycode, /* prefer key code, e.g. K_DEL instead of DEL */
- int in_string) /* TRUE when inside a double quoted string */
+ int keycode, // prefer key code, e.g. K_DEL instead of DEL
+ int in_string) // TRUE when inside a double quoted string
{
int modifiers = 0;
int key;
- int dlen = 0;
key = find_special_key(srcp, &modifiers, keycode, FALSE, in_string);
if (key == 0)
return 0;
+ return special_to_buf(key, modifiers, keycode, dst);
+}
+
+/*
+ * Put the character sequence for "key" with "modifiers" into "dst" and return
+ * the resulting length.
+ * When "keycode" is TRUE prefer key code, e.g. K_DEL instead of DEL.
+ * The sequence is not NUL terminated.
+ * This is how characters in a string are encoded.
+ */
+ int
+special_to_buf(int key, int modifiers, int keycode, char_u *dst)
+{
+ int dlen = 0;
+
/* Put the appropriate modifier in a string */
if (modifiers != 0)
{