mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 20:08:17 +00:00
vim-patch:7.4.1533 #5320
Problem: Using feedkeys() with an empty string disregards 'x' option.
Solution: Make 'x' work with an empty string. (Thinca)
When integrating the patch to nvim, used same logic but different code
based on nvim codebase. New test passed.
74c5bbf134
This commit is contained in:

committed by
Justin M. Keyes

parent
ca65514a24
commit
c4c2969624
@@ -59,10 +59,6 @@ void nvim_feedkeys(String keys, String mode, Boolean escape_csi)
|
||||
bool typed = false;
|
||||
bool execute = false;
|
||||
|
||||
if (keys.size == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < mode.size; ++i) {
|
||||
switch (mode.data[i]) {
|
||||
case 'n': remap = false; break;
|
||||
@@ -73,6 +69,10 @@ void nvim_feedkeys(String keys, String mode, Boolean escape_csi)
|
||||
}
|
||||
}
|
||||
|
||||
if (keys.size == 0 && !execute) {
|
||||
return;
|
||||
}
|
||||
|
||||
char *keys_esc;
|
||||
if (escape_csi) {
|
||||
// Need to escape K_SPECIAL and CSI before putting the string in the
|
||||
|
Reference in New Issue
Block a user