summaryrefslogtreecommitdiff
path: root/src/mark.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-08-02 17:22:23 +0200
committerBram Moolenaar <Bram@vim.org>2013-08-02 17:22:23 +0200
commitbc88a275375c65538c2eaadb55d4ddc26346f695 (patch)
tree8b33ddab2abf1264571b6421a4897c23c293a7fe /src/mark.c
parent4008f4fb08f969c87e8f13bd9e019790757e08ad (diff)
downloadvim-git-bc88a275375c65538c2eaadb55d4ddc26346f695.tar.gz
updated for version 7.4b.009v7.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)
Diffstat (limited to 'src/mark.c')
-rw-r--r--src/mark.c15
1 files changed, 8 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