Module Name:    src
Committed By:   rin
Date:           Wed Aug  1 02:48:47 UTC 2018

Modified Files:
        src/external/bsd/nvi/dist/common: conv.h

Log Message:
As described in comments, we treat non-spacing chars as single-width ones.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/nvi/dist/common/conv.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/nvi/dist/common/conv.h
diff -u src/external/bsd/nvi/dist/common/conv.h:1.3 src/external/bsd/nvi/dist/common/conv.h:1.4
--- src/external/bsd/nvi/dist/common/conv.h:1.3	Sun Jun  3 08:08:36 2018
+++ src/external/bsd/nvi/dist/common/conv.h	Wed Aug  1 02:48:47 2018
@@ -1,11 +1,11 @@
-/*	$NetBSD: conv.h,v 1.3 2018/06/03 08:08:36 rin Exp $	*/
+/*	$NetBSD: conv.h,v 1.4 2018/08/01 02:48:47 rin Exp $	*/
 
 /*
  * We ensure that every wide char occupies at least one display width.
  * See vs_line.c for more details.
  */
 #define WIDE_COL(sp, ch)						\
-	(CHAR_WIDTH(sp, ch) >= 0 ? CHAR_WIDTH(sp, ch) : 1)
+	(CHAR_WIDTH(sp, ch) > 0 ? CHAR_WIDTH(sp, ch) : 1)
 
 #define KEY_COL(sp, ch)							\
 	(INTISWIDE(ch) ? (size_t)WIDE_COL(sp, ch) : KEY_LEN(sp, ch))

Reply via email to