shithub: neatroff

Download patch

ref: a0a39eaf9c338a38464e6bc139bc4a4460fc6748
parent: 37292b45bd9935671eacae7ef3d4286f764182c8
author: Ali Gholami Rudi <ali@rudi.ir>
date: Sun Apr 14 14:37:12 EDT 2013

ren: .ne should not cause break

--- a/ren.c
+++ b/ren.c
@@ -128,7 +128,7 @@
 static void push_ne(int dobr)
 {
 	char buf[32];
-	sprintf(buf, "%cne %du\n", dobr ? '.' : '\'', n_p);
+	sprintf(buf, "%s.ne %du\n", dobr ? ".br\n" : "", n_p);
 	in_push(buf, NULL);
 }
 
@@ -235,8 +235,7 @@
 void tr_ne(char **args)
 {
 	int n = args[1] ? eval(args[1], 0, 'v') : n_v;
-	ren_br(1);
-	if (!ren_traps(n_d, n_d + n, 1))
+	if (!ren_traps(n_d, n_d + n - 1, 1))
 		ren_pagelimit(n);
 }