mirror of
https://github.com/neovim/neovim.git
synced 2025-09-17 16:58:17 +00:00
vim-patch:8.0.0374: invalid memory access when using :sc in Ex mode (#7849)
Problem: Invalid memory access when using :sc in Ex mode. (Dominique Pelle)
Solution: Avoid the column being negative. Also fix a hang in Ex mode.
ba748c8a84
This commit is contained in:

committed by
Justin M. Keyes

parent
f8f7f9d5f5
commit
26251d6d06
@@ -2164,7 +2164,13 @@ getexmodeline (
|
||||
/* Get one character at a time. Don't use inchar(), it can't handle
|
||||
* special characters. */
|
||||
prev_char = c1;
|
||||
c1 = vgetc();
|
||||
|
||||
// Check for a ":normal" command and no more characters left.
|
||||
if (ex_normal_busy > 0 && typebuf.tb_len == 0) {
|
||||
c1 = '\n';
|
||||
} else {
|
||||
c1 = vgetc();
|
||||
}
|
||||
|
||||
/*
|
||||
* Handle line editing.
|
||||
|
Reference in New Issue
Block a user