mirror of
https://github.com/neovim/neovim.git
synced 2026-04-29 10:44:08 +00:00
vim-patch:8.2.4636: not using Visual range
Problem: Not using Visual range.
Solution: Put the command pointer back to the range.
1501b63f8d
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -2761,14 +2761,19 @@ int parse_command_modifiers(exarg_T *eap, const char **errormsg, cmdmod_T *cmod,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (has_visual_range && eap->cmd > cmd_start) {
|
if (has_visual_range) {
|
||||||
// Move the '<,'> range to after the modifiers and insert a colon.
|
if (eap->cmd > cmd_start) {
|
||||||
// Since the modifiers have been parsed put the colon on top of the
|
// Move the '<,'> range to after the modifiers and insert a colon.
|
||||||
// space: "'<,'>mod cmd" -> "mod:'<,'>cmd
|
// Since the modifiers have been parsed put the colon on top of the
|
||||||
// Put eap->cmd after the colon.
|
// space: "'<,'>mod cmd" -> "mod:'<,'>cmd
|
||||||
memmove(cmd_start - 5, cmd_start, (size_t)(eap->cmd - cmd_start));
|
// Put eap->cmd after the colon.
|
||||||
eap->cmd -= 5;
|
memmove(cmd_start - 5, cmd_start, (size_t)(eap->cmd - cmd_start));
|
||||||
memmove(eap->cmd - 1, ":'<,'>", 6);
|
eap->cmd -= 5;
|
||||||
|
memmove(eap->cmd - 1, ":'<,'>", 6);
|
||||||
|
} else {
|
||||||
|
// no modifiers, move the pointer back
|
||||||
|
eap->cmd -= 5;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
|
|||||||
Reference in New Issue
Block a user