shithub: neatroff

Download patch

ref: acc013a05307bd4c5a45a63cd9ea7a203ba731db
parent: 41a23f824b7866f6dd87573223a79866a706a803
author: Ali Gholami Rudi <ali@rudi.ir>
date: Thu Mar 15 21:12:28 EDT 2018

wb: insert keshideh after the last possible character

--- a/wb.c
+++ b/wb.c
@@ -595,7 +595,7 @@
 	s = word;
 	while ((c = escread(&s, &d)) >= 0) {
 		wb_putc(dst, c, d);
-		if (!c && strcmp("ـ", d) && keshideh(p)) {
+		if (!c && keshideh(p)) {
 			struct glyph *g = dev_glyph("ـ", R_F(dst));
 			int kw = g ? font_gwid(g->font,
 					dev_font(R_F(dst)), R_S(dst), g->wid) : 0;
@@ -613,7 +613,7 @@
 	while ((c = escread(&s, &d)) >= 0) {
 		wb_putc(dst, c, d);
 		if (s == s_kesh)
-				wb_putc(dst, 0, "ـ");
+			wb_putc(dst, 0, "ـ");
 	}
 	return ins;
 }