aboutsummaryrefslogtreecommitdiff
path: root/lib/libedit/refresh.c
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1994-10-02 02:01:21 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1994-10-02 02:01:21 +0000
commit006e8b41fbfc67c77ce47ba36671a4d20a53a55e (patch)
treeeebf5f351d2b6a17b398b5c404834c5ec7bb69f3 /lib/libedit/refresh.c
parent3d1dcf1ba538aee1b38bb9473f77ad387b1b2842 (diff)
downloadsrc-006e8b41fbfc67c77ce47ba36671a4d20a53a55e.tar.gz
src-006e8b41fbfc67c77ce47ba36671a4d20a53a55e.zip
Notes
Diffstat (limited to 'lib/libedit/refresh.c')
-rw-r--r--lib/libedit/refresh.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/libedit/refresh.c b/lib/libedit/refresh.c
index b64d0119c6eb..51fe769c5141 100644
--- a/lib/libedit/refresh.c
+++ b/lib/libedit/refresh.c
@@ -97,6 +97,7 @@ re_addc(el, c)
EditLine *el;
int c;
{
+ c &= 0xFF;
if (isprint(c)) {
re_putc(el, c);
return;
@@ -863,7 +864,8 @@ protected void
re_refresh_cursor(el)
EditLine *el;
{
- char *cp, c;
+ char *cp;
+ int c;
int h, v, th;
/* first we must find where the cursor is... */
@@ -873,7 +875,7 @@ re_refresh_cursor(el)
/* do input buffer to el->el_line.cursor */
for (cp = el->el_line.buffer; cp < el->el_line.cursor; cp++) {
- c = *cp;
+ c = *cp & 0xFF;
h++; /* all chars at least this long */
if (c == '\n') { /* handle newline in data part too */
@@ -944,9 +946,9 @@ protected void
re_fastaddc(el)
EditLine *el;
{
- char c;
+ int c;
- c = el->el_line.cursor[-1];
+ c = el->el_line.cursor[-1] & 0xFF;
if (c == '\t' || el->el_line.cursor != el->el_line.lastchar) {
re_refresh(el); /* too hard to handle */