diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-04-26 23:12:42 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-04-26 23:12:42 -0400 |
commit | ea483231c57d2acf6f4e17db82d33124526931f9 (patch) | |
tree | b26950291fbe3813b57db732cad9e152f6a6e1bc /src/nvim/menu.c | |
parent | e861af85f89e119193a9e219a4cb766757e28e5a (diff) | |
parent | 191fb638f415a0a1a05eb83a87d87fc9902d7ffe (diff) | |
download | rneovim-ea483231c57d2acf6f4e17db82d33124526931f9.tar.gz rneovim-ea483231c57d2acf6f4e17db82d33124526931f9.tar.bz2 rneovim-ea483231c57d2acf6f4e17db82d33124526931f9.zip |
Merge pull request #4593 from ZyX-I/length-functions
Make some function accept strings with length in place of just strings
Diffstat (limited to 'src/nvim/menu.c')
-rw-r--r-- | src/nvim/menu.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/nvim/menu.c b/src/nvim/menu.c index 91a72abfc5..3c2394d579 100644 --- a/src/nvim/menu.c +++ b/src/nvim/menu.c @@ -215,10 +215,12 @@ ex_menu ( if (STRICMP(map_to, "<nop>") == 0) { /* "<Nop>" means nothing */ map_to = (char_u *)""; map_buf = NULL; - } else if (modes & MENU_TIP_MODE) - map_buf = NULL; /* Menu tips are plain text. */ - else - map_to = replace_termcodes(map_to, &map_buf, FALSE, TRUE, special); + } else if (modes & MENU_TIP_MODE) { + map_buf = NULL; // Menu tips are plain text. + } else { + map_to = replace_termcodes(map_to, STRLEN(map_to), &map_buf, false, true, + special, CPO_TO_CPO_FLAGS); + } menuarg.modes = modes; menuarg.noremap[0] = noremap; menuarg.silent[0] = silent; |