aboutsummaryrefslogtreecommitdiff
path: root/literal.c
diff options
context:
space:
mode:
Diffstat (limited to 'literal.c')
-rw-r--r--literal.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/literal.c b/literal.c
index f6eac26937e8..f6f63cb3fb06 100644
--- a/literal.c
+++ b/literal.c
@@ -1,4 +1,4 @@
-/* $NetBSD: literal.c,v 1.5 2019/07/23 13:10:11 christos Exp $ */
+/* $NetBSD: literal.c,v 1.6 2024/12/05 22:21:53 christos Exp $ */
/*-
* Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include "config.h"
#if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: literal.c,v 1.5 2019/07/23 13:10:11 christos Exp $");
+__RCSID("$NetBSD: literal.c,v 1.6 2024/12/05 22:21:53 christos Exp $");
#endif /* not lint && not SCCSID */
/*
@@ -85,7 +85,7 @@ literal_add(EditLine *el, const wchar_t *buf, const wchar_t *end, int *wp)
w = wcwidth(end[1]); /* column width of the visible char */
*wp = (int)w;
- if (w <= 0) /* we require something to be printed */
+ if (w < 0) /* non-printable characters are negative */
return 0;
len = (size_t)(end - buf);