vis

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

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

commit 2e304150297751d40d1429da0f5489afe31a4ba6
parent 5732e17ff457d6982f18fddc6777df549947a667
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Tue,  7 Jul 2015 09:54:10 +0200

text: avoid double close in error case

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

diff --git a/text.c b/text.c @@ -870,6 +870,7 @@ static bool text_range_save_atomic(Text *txt, Filerange *range, const char *file fd = -1; goto err; } + fd = -1; if (rename(tmpname, filename) == -1) goto err;