as a normal space character, and not width 0. Bug reported by bentley@.
-/* $Id: term_ascii.c,v 1.14 2014/04/20 16:44:44 schwarze Exp $ */
+/* $Id: term_ascii.c,v 1.15 2014/07/27 21:51:53 schwarze Exp $ */
/*
* Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
{
int rc;
- return((rc = wcwidth(c)) < 0 ? 0 : rc);
+ if (c == ASCII_NBRSP)
+ c = ' ';
+ rc = wcwidth(c);
+ if (rc < 0)
+ rc = 0;
+ return(rc);
}
static void