Skip to content

Commit b55a951

Browse files
committed
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)
1 parent aad33fe commit b55a951

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

src/mark.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,15 @@ setmark_pos(c, pos, fnum)
9999
}
100100

101101
#ifdef FEAT_VISUAL
102-
if (c == '<')
102+
if (c == '<' || c == '>')
103103
{
104-
curbuf->b_visual.vi_start = *pos;
105-
return OK;
106-
}
107-
if (c == '>')
108-
{
109-
curbuf->b_visual.vi_end = *pos;
104+
if (c == '<')
105+
curbuf->b_visual.vi_start = *pos;
106+
else
107+
curbuf->b_visual.vi_end = *pos;
108+
if (curbuf->b_visual.vi_mode == NUL)
109+
/* Visual_mode has not yet been set, use a sane default. */
110+
curbuf->b_visual.vi_mode = 'v';
110111
return OK;
111112
}
112113
#endif

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,8 @@ static char *(features[]) =
727727

728728
static int included_patches[] =
729729
{ /* Add new patch number below this line */
730+
/**/
731+
9,
730732
/**/
731733
8,
732734
/**/

0 commit comments

Comments
 (0)