All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] col: backspacing widechars
@ 2016-12-28  9:36 The Flying Rapist
  2016-12-28 14:55 ` Sami Kerola
  0 siblings, 1 reply; 6+ messages in thread
From: The Flying Rapist @ 2016-12-28  9:36 UTC (permalink / raw)
  To: util-linux; +Cc: The Flying Rapist

From: The Flying Rapist <admin@nosuck.org>

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-01-16 11:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-28  9:36 [PATCH] col: backspacing widechars The Flying Rapist
2016-12-28 14:55 ` Sami Kerola
2016-12-28 20:42   ` The Flying Rapist
2017-01-04 11:06     ` Karel Zak
2017-01-04 22:19       ` Sami Kerola
2017-01-16 11:35         ` Karel Zak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.