• fix the third dramsey scrolling bug for both ^D at BOL and ^W at EOL

(I hope)
• fix another one I found: after ^D'ing, insert at BOL, the > is displayed
  one character too late
This commit is contained in:
tg 2007-05-21 19:25:32 +00:00
parent 5323f6023b
commit f5d4e21aa2
3 changed files with 9 additions and 7 deletions

View File

@ -1,4 +1,4 @@
# $MirOS: src/bin/mksh/check.t,v 1.105 2007/05/20 17:53:12 tg Exp $
# $MirOS: src/bin/mksh/check.t,v 1.106 2007/05/21 19:25:30 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/05/20
@(#)MIRBSD KSH R29 2007/05/21
description:
Check version of shell.
category: pdksh

8
edit.c
View File

@ -5,7 +5,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.93 2007/05/21 12:24:44 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.94 2007/05/21 19:25:31 tg Exp $");
/* tty driver characters we are interested in */
typedef struct {
@ -1602,6 +1602,8 @@ x_ins(const char *s)
while (cp > xcp)
x_bs2(cp = utf_backch(cp));
}
if (xlp == xep - 1)
x_redraw(xx_cols);
x_adj_ok = 1;
return 0;
}
@ -1693,9 +1695,9 @@ x_delete(int nc, int push)
* there is no need to ' ','\b'.
* But if we must, make sure we do the minimum.
*/
if ((i = xx_cols - 2 - x_col) > 0) {
if ((i = xx_cols - 2 - x_col) > 0 || xep - xlp == 0) {
nw = (nw < i) ? nw : i;
i = nw;
i = ++nw;
while (i--)
x_e_putc2(' ');
i = nw;

4
sh.h
View File

@ -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.133 2007/05/20 17:53:13 tg Exp $"
#define MKSH_VERSION "R29 2007/05/20"
#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.134 2007/05/21 19:25:32 tg Exp $"
#define MKSH_VERSION "R29 2007/05/21"
#if HAVE_SYS_PARAM_H
#include <sys/param.h>