diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-02-22 11:22:13 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-02-22 12:42:19 +0100 |
| commit | 75c24bb43ccbc0907eb427a44330e66986601f88 (patch) | |
| tree | 46bf504e528d9d83ae0f61c4a725f88d9ab5622b /vis-operators.c | |
| parent | 75ff22469b21e72a4c9126d89cfa3623af1784fd (diff) | |
| download | vis-75c24bb43ccbc0907eb427a44330e66986601f88.tar.gz vis-75c24bb43ccbc0907eb427a44330e66986601f88.tar.xz | |
vis: simplify `r` implementation and fix cursor positioning
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 2a51b2f..2ffed01 100644 --- a/vis-operators.c +++ b/vis-operators.c @@ -232,7 +232,7 @@ static size_t op_replace(Vis *vis, Text *txt, OperatorContext *c) { size_t pos = c->range.start; for (size_t len = strlen(c->arg->s); count > 0; pos += len, count--) text_insert(txt, pos, c->arg->s, len); - return pos; + return c->range.start; } static size_t op_filter(Vis *vis, Text *txt, OperatorContext *c) { |
