aboutsummaryrefslogtreecommitdiff
path: root/literal.c
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2025-04-16 20:16:43 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2025-04-16 20:18:02 +0000
commitb3884193b7bd3977acc44790b6278b60517ad097 (patch)
treed3a58576a5bbfb38982096462194e26a33aca620 /literal.c
parent5a36c82614102a8c3926bca0bdb9d44149691be8 (diff)
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);