diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2015-11-02 18:29:52 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2015-11-02 19:37:50 +0100 |
| commit | d6ec134f3d50f8ff21a80a0fdbaecce8931ee7d7 (patch) | |
| tree | 7c83fef4eb8801eb8fb40f0700e095d4118203d0 /text.c | |
| parent | 7b07826a9b644f78de5395301d116a2c04e7c2f8 (diff) | |
| download | vis-d6ec134f3d50f8ff21a80a0fdbaecce8931ee7d7.tar.gz vis-d6ec134f3d50f8ff21a80a0fdbaecce8931ee7d7.tar.xz | |
text: return end of changed range in text_redo
This affects the cursor placement when redoing changes in
single cursor mode.
Closes #42
Diffstat (limited to 'text.c')
| -rw-r--r-- | text.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -680,6 +680,8 @@ static size_t action_redo(Text *txt, Action *a) { for ( ; c; c = c->prev) { span_swap(txt, &c->old, &c->new); pos = c->pos; + if (c->new.len > c->old.len) + pos += c->new.len - c->old.len; } return pos; } |
