Fix a redraw problem that occurs when a recalled history line has
length equal to screen width - 2. Spotted by jmc@, tested by various. ok deraadt@ From otto@obsd
This commit is contained in:
parent
b2bea18ea3
commit
892c6123c5
11
edit.c
11
edit.c
@ -1,7 +1,7 @@
|
||||
/** $MirOS: src/bin/mksh/edit.c,v 1.14 2005/10/07 18:32:23 tg Exp $ */
|
||||
/** $MirOS: src/bin/mksh/edit.c,v 1.15 2005/10/07 18:34:18 tg Exp $ */
|
||||
/* $OpenBSD: edit.c,v 1.30 2005/09/11 18:08:47 otto Exp $ */
|
||||
/* $OpenBSD: edit.h,v 1.8 2005/03/28 21:28:22 deraadt Exp $ */
|
||||
/* $OpenBSD: emacs.c,v 1.38 2005/08/01 04:27:31 deraadt Exp $ */
|
||||
/* $OpenBSD: emacs.c,v 1.39 2005/09/26 19:25:22 otto Exp $ */
|
||||
/* $OpenBSD: vi.c,v 1.21 2005/03/30 17:16:37 deraadt Exp $ */
|
||||
|
||||
#include "sh.h"
|
||||
@ -10,7 +10,7 @@
|
||||
#include <ctype.h>
|
||||
#include <libgen.h>
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.14 2005/10/07 18:32:23 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.15 2005/10/07 18:34:18 tg Exp $");
|
||||
|
||||
/* tty driver characters we are interested in */
|
||||
typedef struct {
|
||||
@ -1783,10 +1783,9 @@ x_load_hist(char **hp)
|
||||
xbp = xbuf;
|
||||
xep = xcp = xbuf + strlen(xbuf);
|
||||
xlp_valid = false;
|
||||
if (xep > x_lastcp())
|
||||
x_goto(xep);
|
||||
else
|
||||
if (xep <= x_lastcp())
|
||||
x_redraw(oldsize);
|
||||
x_goto(xep);
|
||||
}
|
||||
|
||||
static int
|
||||
|
Loading…
x
Reference in New Issue
Block a user