Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libcurses whline - save/restore the y coordinate too.
details: https://anonhg.NetBSD.org/src/rev/3bbb6e498568
branches: trunk
changeset: 973432:3bbb6e498568
user: uwe <uwe%NetBSD.org@localhost>
date: Tue Jun 30 21:10:13 2020 +0000
description:
whline - save/restore the y coordinate too.
Reaching the right side of the screen can cause a line wrap.
Forgot to apply the fix to the !HAVE_WCHAR case.
PR lib/55434
diffstat:
lib/libcurses/line.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diffs (40 lines):
diff -r bd3b71752631 -r 3bbb6e498568 lib/libcurses/line.c
--- a/lib/libcurses/line.c Tue Jun 30 21:02:24 2020 +0000
+++ b/lib/libcurses/line.c Tue Jun 30 21:10:13 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: line.c,v 1.12 2020/06/30 21:02:24 uwe Exp $ */
+/* $NetBSD: line.c,v 1.13 2020/06/30 21:10:13 uwe Exp $ */
/*-
* Copyright (c) 1998-1999 Brett Lymn
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: line.c,v 1.12 2020/06/30 21:02:24 uwe Exp $");
+__RCSID("$NetBSD: line.c,v 1.13 2020/06/30 21:10:13 uwe Exp $");
#endif /* not lint */
#include <string.h>
@@ -87,17 +87,18 @@
whline(WINDOW *win, chtype ch, int count)
{
#ifndef HAVE_WCHAR
- int ocurx, n, i;
+ int ocury, ocurx, n, i;
n = min(count, win->maxx - win->curx);
+ ocury = win->curx;
ocurx = win->curx;
if (!(ch & __CHARTEXT))
ch |= ACS_HLINE;
for (i = 0; i < n; i++)
- mvwaddch(win, win->cury, ocurx + i, ch);
+ mvwaddch(win, ocury, ocurx + i, ch);
- wmove(win, win->cury, ocurx);
+ wmove(win, ocury, ocurx);
return OK;
#else
cchar_t cch, *cchp;
Home |
Main Index |
Thread Index |
Old Index