[PATCH] col: backspacing widechars

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: The Flying Rapist <admin@xxxxxxxxxx>

Until now, backspace characters have not accounted for characters of widths other than one.  This single line amends that.
---
 text-utils/col.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/text-utils/col.c b/text-utils/col.c
index 9b0e23058..c63b46fee 100644
--- a/text-utils/col.c
+++ b/text-utils/col.c
@@ -248,7 +248,7 @@ int main(int argc, char **argv)
 			case BS:		/* can't go back further */
 				if (cur_col == 0)
 					continue;
-				--cur_col;
+				cur_col -= c->c_width;
 				continue;
 			case CR:
 				cur_col = 0;
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux