mirror of
https://github.com/neovim/neovim.git
synced 2025-09-14 15:28: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
@@ -8831,14 +8831,13 @@ static void f_feedkeys(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
return;
|
||||
|
||||
keys = get_tv_string(&argvars[0]);
|
||||
if (*keys != NUL) {
|
||||
if (argvars[1].v_type != VAR_UNKNOWN) {
|
||||
flags = get_tv_string_buf(&argvars[1], nbuf);
|
||||
}
|
||||
|
||||
nvim_feedkeys(cstr_as_string((char *)keys),
|
||||
cstr_as_string((char *)flags), true);
|
||||
if (argvars[1].v_type != VAR_UNKNOWN) {
|
||||
flags = get_tv_string_buf(&argvars[1], nbuf);
|
||||
}
|
||||
|
||||
nvim_feedkeys(cstr_as_string((char *)keys),
|
||||
cstr_as_string((char *)flags), true);
|
||||
}
|
||||
|
||||
/// "filereadable()" function
|
||||
|
Reference in New Issue
Block a user