From 384032b7296012151b42ed8caeb57d63ac721317 Mon Sep 17 00:00:00 2001 From: tg Date: Thu, 10 May 2007 19:08:48 +0000 Subject: [PATCH] =?UTF-8?q?fix=20the=20=E2=80=9Cdramsey=20horizontal=20scr?= =?UTF-8?q?olling=20bug=E2=80=9D=20=E2=80=93=20time=20for=20you=20to=20fin?= =?UTF-8?q?d=20another=20=E2=98=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- check.t | 4 ++-- edit.c | 12 ++++++++++-- sh.h | 4 ++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/check.t b/check.t index 29ee05e..06dbf48 100644 --- a/check.t +++ b/check.t @@ -1,4 +1,4 @@ -# $MirOS: src/bin/mksh/check.t,v 1.101 2007/04/23 21:46:12 tg Exp $ +# $MirOS: src/bin/mksh/check.t,v 1.102 2007/05/10 19:08:47 tg Exp $ # $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $ # $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $ # $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $ @@ -7,7 +7,7 @@ # http://www.research.att.com/~gsf/public/ifs.sh expected-stdout: - @(#)MIRBSD KSH R29 2007/04/17 + @(#)MIRBSD KSH R29 2007/05/10 description: Check version of shell. category: pdksh diff --git a/edit.c b/edit.c index 03b53cc..d3303e9 100644 --- a/edit.c +++ b/edit.c @@ -5,7 +5,7 @@ #include "sh.h" -__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.89 2007/05/10 18:58:31 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.90 2007/05/10 19:08:48 tg Exp $"); /* tty driver characters we are interested in */ typedef struct { @@ -2832,8 +2832,16 @@ do_complete(int flags, /* XCF_{COMMAND,FILE,COMMAND_FILE} */ x_print_expansions(nwords, words, is_command); completed = 1; } - if (completed) + if (completed) { + /* + * I don't quite get it: the x_goto(xcp) call is equivalent to + * x_adjust() if we are ASCII-only and "heading off screen", + * but putting x_adjust() here instead of x_goto(xcp) does not + * fix the dramsey horizontal scrolling bug. Weird. + */ + x_goto(xcp); x_redraw(0); + } x_free_words(nwords, words); } diff --git a/sh.h b/sh.h index 21d85d4..d457d67 100644 --- a/sh.h +++ b/sh.h @@ -8,8 +8,8 @@ /* $OpenBSD: c_test.h,v 1.4 2004/12/20 11:34:26 otto Exp $ */ /* $OpenBSD: tty.h,v 1.5 2004/12/20 11:34:26 otto Exp $ */ -#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.127 2007/04/24 10:42:02 tg Exp $" -#define MKSH_VERSION "R29 2007/04/17" +#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.128 2007/05/10 19:08:48 tg Exp $" +#define MKSH_VERSION "R29 2007/05/10" #if HAVE_SYS_PARAM_H #include