From bc88a275375c65538c2eaadb55d4ddc26346f695 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 2 Aug 2013 17:22:23 +0200 Subject: [PATCH] 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) --- src/mark.c | 15 ++++++++------- src/version.c | 2 ++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/mark.c b/src/mark.c index f31f53b52..1ac91d8b1 100644 --- 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 diff --git a/src/version.c b/src/version.c index 22fc9b961..9b5343e9d 100644 --- a/src/version.c +++ b/src/version.c @@ -727,6 +727,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 9, /**/ 8, /**/ -- 2.50.1