aboutsummaryrefslogtreecommitdiff
path: root/vis.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2014-09-24 20:59:57 +0200
committerMarc André Tanner <mat@brain-dump.org>2014-09-24 20:59:57 +0200
commitd8bf6b83391edb8be69ce390e788785ddb0b806f (patch)
tree6f0ce35e61bb580ca9459a36a9c27b960feb6645 /vis.c
parenta45f2fee080ab02d968c4e7c844a212e09180147 (diff)
downloadvis-d8bf6b83391edb8be69ce390e788785ddb0b806f.tar.gz
vis-d8bf6b83391edb8be69ce390e788785ddb0b806f.tar.xz
Fix cursor position after 'p'
Diffstat (limited to 'vis.c')
-rw-r--r--vis.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vis.c b/vis.c
index 83abe70..17b7cf2 100644
--- a/vis.c
+++ b/vis.c
@@ -508,8 +508,8 @@ static void op_put(OperatorContext *c) {
pos = text_line_begin(txt, pos);
}
editor_insert(vis, pos, c->reg->data, c->reg->len);
- if (c->reg->linewise || c->arg->i > 0)
- window_cursor_to(vis->win->win, pos);
+ if (c->reg->linewise)
+ window_cursor_to(vis->win->win, text_line_start(txt, pos));
else
window_cursor_to(vis->win->win, pos + c->reg->len);
}