shithub: neatroff

Download patch

ref: 56e2fafa30f4ce28ceccb15ad74da1e046a42714
parent: fb17e06606cc8a8e9615d5155843203ef81d06c3
author: Ali Gholami Rudi <ali@rudi.ir>
date: Mon Oct 31 16:00:26 EDT 2016

ren: flush the partial line before computing .sp absolute positions

Reported by Dirk-Wilhelm Peters <peters@schwertfisch.de>.

--- a/ren.c
+++ b/ren.c
@@ -418,9 +418,10 @@
 void tr_sp(char **args)
 {
 	int traps = 0;
-	int n = args[1] ? eval(args[1], 'v') : n_v;
+	int n;
 	if (args[0][0] == c_cc)
 		traps = ren_br();
+	n = args[1] ? eval(args[1], 'v') : n_v;
 	if (n && (!n_ns || ren_div) && !traps)
 		down(n);
 }