fix multiline prompts with "delimiter chars"

(only the last line of the prompt is redrawn, keep this in mind
when doing the ANSI colour game)

TODO:
* maybe go back up one line and redraw whole prompt?
* optionally edit command on multiple lines, bash-like,
  instead of scrolling horizontally
This commit is contained in:
tg
2006-08-01 14:59:51 +00:00
parent a15c5c319a
commit 857fb659bc
2 changed files with 7 additions and 6 deletions

4
edit.c
View File

@ -5,7 +5,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.27 2006/08/01 14:35:43 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.28 2006/08/01 14:59:50 tg Exp $");
/* tty driver characters we are interested in */
typedef struct {
@ -1941,7 +1941,7 @@ x_redraw(int limit)
pprompt(prompt + prompt_skip, x_trunc);
}
if (x_col > xx_cols)
x_col = x_col - (x_col / xx_cols) * xx_cols;
x_col %= xx_cols;
x_displen = xx_cols - 2 - x_col;
if (x_displen < 1) {
x_col = 0;