vim-patch:7.4.2362

Problem:    Illegal memory access with ":1@". (Dominique Pelle)
Solution:   Correct cursor column after setting the line number.  Also avoid
            calling end_visual_mode() when not in Visual mode.

4930a76a03
This commit is contained in:
raichoo
2017-03-11 13:42:06 +01:00
parent a4f20db08c
commit 86b1e7f583
3 changed files with 4 additions and 3 deletions

View File

@@ -441,7 +441,7 @@ void close_buffer(win_T *win, buf_T *buf, int action, int abort_if_last)
// When closing the current buffer stop Visual mode before freeing
// anything.
if (is_curbuf) {
if (is_curbuf && VIsual_active) {
end_visual_mode();
}
@@ -1083,7 +1083,7 @@ do_buffer (
}
// When closing the current buffer stop Visual mode.
if (buf == curbuf) {
if (buf == curbuf && VIsual_active) {
end_visual_mode();
}