diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-02-21 10:29:55 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-02-21 10:29:55 +0100 |
| commit | fbdc71b86b0d8f5b8b79e936c97d00e3a7cba984 (patch) | |
| tree | 6575f3407fcda367adf1655b901fa28f00d7fcef /vis-operators.c | |
| parent | 08ecde01710143fb93808f2e728a043aa77d9ad4 (diff) | |
| download | vis-fbdc71b86b0d8f5b8b79e936c97d00e3a7cba984.tar.gz vis-fbdc71b86b0d8f5b8b79e936c97d00e3a7cba984.tar.xz | |
vis: only move to start of yanked range if it is not line wise
Otherwise this completely breaks the common case of yanking a whole
line with yy. This also means that the beavior in visual line mode
is different than in vim.
Partially reverts ff57c0b8598a60617983ebe25d34c79a9c6bc511.
Diffstat (limited to 'vis-operators.c')
| -rw-r--r-- | vis-operators.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vis-operators.c b/vis-operators.c index 0f3ae19..2408d07 100644 --- a/vis-operators.c +++ b/vis-operators.c @@ -27,7 +27,7 @@ static size_t op_yank(Vis *vis, Text *txt, OperatorContext *c) { register_put(vis, c->reg, txt, &c->range); if (c->reg == &vis->registers[VIS_REG_DEFAULT]) register_put(vis, &vis->registers[VIS_REG_ZERO], txt, &c->range); - return c->range.start; + return c->linewise ? c->pos : c->range.start; } static size_t op_put(Vis *vis, Text *txt, OperatorContext *c) { |
