diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-02-18 23:12:01 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-02-18 23:12:01 +0100 |
commit | 46522af72424c7fadfa7a4cbba3dd21b82d19131 (patch) | |
tree | 3fa8c013e9bf1ad3112367c3870ae3a76d745321 /src/search.c | |
parent | 803452046ba6cda7a2896626572eb78b2358c965 (diff) | |
download | vim-git-46522af72424c7fadfa7a4cbba3dd21b82d19131.tar.gz |
patch 8.0.0339: illegal memory access with vi'v8.0.0339
Problem: Illegal memory access with vi'
Solution: For quoted text objects bail out if the Visual area spans more
than one line.
Diffstat (limited to 'src/search.c')
-rw-r--r-- | src/search.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/search.c b/src/search.c index 6e62184d4..83c584272 100644 --- a/src/search.c +++ b/src/search.c @@ -4357,6 +4357,10 @@ current_quote( /* Correct cursor when 'selection' is exclusive */ if (VIsual_active) { + /* this only works within one line */ + if (VIsual.lnum != curwin->w_cursor.lnum) + return FALSE; + vis_bef_curs = lt(VIsual, curwin->w_cursor); if (*p_sel == 'e' && vis_bef_curs) dec_cursor(); |