vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit fba1289400b5c1e69e2560e625bf166600ef202a
parent 8d448a90889da61056ce73a732b75ef99713eb6a
Author: Silvan Jegen <s.jegen@gmail.com>
Date:   Tue, 23 Jun 2015 20:36:01 +0200

Do not take a snapshot in text_range_write

Since text_range_write is called several times in cmd_filter, the undo
command does not undo the whole filter operation but only up to the
last call of text_range_write. Removing the snapshot-taking code solves
this issue.

Diffstat:
Mtext.c | 2--
1 file changed, 0 insertions(+), 2 deletions(-)

diff --git a/text.c b/text.c @@ -785,8 +785,6 @@ ssize_t text_range_write(Text *txt, Filerange *range, int fd) { } } out: - txt->saved_action = txt->history; - text_snapshot(txt); return size - rem; }