comparison src/misc2.c @ 16880:998603a243d7 v8.1.1441

patch 8.1.1441: popup window filter not yet implemented commit https://github.com/vim/vim/commit/bf0eff0b724ebf4951f7ca82e6c648451f9f0c01 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jun 1 17:13:36 2019 +0200 patch 8.1.1441: popup window filter not yet implemented Problem: Popup window filter not yet implemented. Solution: Implement the popup filter.
author Bram Moolenaar <Bram@vim.org>
date Sat, 01 Jun 2019 17:15:06 +0200
parents cdca5f577c36
children d4ecdb8a4c58
comparison
equal deleted inserted replaced
16879:3fc7f1139ab4 16880:998603a243d7
2729 */ 2729 */
2730 int 2730 int
2731 trans_special( 2731 trans_special(
2732 char_u **srcp, 2732 char_u **srcp,
2733 char_u *dst, 2733 char_u *dst,
2734 int keycode, /* prefer key code, e.g. K_DEL instead of DEL */ 2734 int keycode, // prefer key code, e.g. K_DEL instead of DEL
2735 int in_string) /* TRUE when inside a double quoted string */ 2735 int in_string) // TRUE when inside a double quoted string
2736 { 2736 {
2737 int modifiers = 0; 2737 int modifiers = 0;
2738 int key; 2738 int key;
2739 int dlen = 0;
2740 2739
2741 key = find_special_key(srcp, &modifiers, keycode, FALSE, in_string); 2740 key = find_special_key(srcp, &modifiers, keycode, FALSE, in_string);
2742 if (key == 0) 2741 if (key == 0)
2743 return 0; 2742 return 0;
2743
2744 return special_to_buf(key, modifiers, keycode, dst);
2745 }
2746
2747 /*
2748 * Put the character sequence for "key" with "modifiers" into "dst" and return
2749 * the resulting length.
2750 * When "keycode" is TRUE prefer key code, e.g. K_DEL instead of DEL.
2751 * The sequence is not NUL terminated.
2752 * This is how characters in a string are encoded.
2753 */
2754 int
2755 special_to_buf(int key, int modifiers, int keycode, char_u *dst)
2756 {
2757 int dlen = 0;
2744 2758
2745 /* Put the appropriate modifier in a string */ 2759 /* Put the appropriate modifier in a string */
2746 if (modifiers != 0) 2760 if (modifiers != 0)
2747 { 2761 {
2748 dst[dlen++] = K_SPECIAL; 2762 dst[dlen++] = K_SPECIAL;