Mercurial > vim
diff src/mark.c @ 5265:cd971e951b06 v7.4b.009
updated for version 7.4b.009
Problem: When setting the Visual area manually and 'selection' is
exclusive, a yank includes one character too much. (Ingo Karkat)
Solution: Default the Visual operation to "v". (Christian Brabandt)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Fri, 02 Aug 2013 17:22:23 +0200 |
parents | c0cc0e0620dd |
children | 2a72805a3038 |
line wrap: on
line diff
--- a/src/mark.c +++ b/src/mark.c @@ -99,14 +99,15 @@ setmark_pos(c, pos, fnum) } #ifdef FEAT_VISUAL - if (c == '<') + if (c == '<' || c == '>') { - curbuf->b_visual.vi_start = *pos; - return OK; - } - if (c == '>') - { - curbuf->b_visual.vi_end = *pos; + if (c == '<') + curbuf->b_visual.vi_start = *pos; + else + curbuf->b_visual.vi_end = *pos; + if (curbuf->b_visual.vi_mode == NUL) + /* Visual_mode has not yet been set, use a sane default. */ + curbuf->b_visual.vi_mode = 'v'; return OK; } #endif