also flush syntax-failed or interrupted input into the history
This commit is contained in:
parent
ca17c0f090
commit
819229fa50
6
lex.c
6
lex.c
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.219 2016/01/21 18:24:41 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.220 2016/03/01 18:00:08 tg Exp $");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* states while lexing word
|
* states while lexing word
|
||||||
@ -1359,8 +1359,10 @@ getsc_line(Source *s)
|
|||||||
ksh_tmout_state = TMOUT_READING;
|
ksh_tmout_state = TMOUT_READING;
|
||||||
alarm(ksh_tmout);
|
alarm(ksh_tmout);
|
||||||
}
|
}
|
||||||
if (interactive)
|
if (interactive) {
|
||||||
|
histsave(&s->line, NULL, HIST_FLUSH, true);
|
||||||
change_winsz();
|
change_winsz();
|
||||||
|
}
|
||||||
#ifndef MKSH_NO_CMDLINE_EDITING
|
#ifndef MKSH_NO_CMDLINE_EDITING
|
||||||
if (have_tty && (
|
if (have_tty && (
|
||||||
#if !MKSH_S_NOVI
|
#if !MKSH_S_NOVI
|
||||||
|
Loading…
x
Reference in New Issue
Block a user