mirror of
https://github.com/janet-lang/janet
synced 2025-01-13 00:50:26 +00:00
Simplify and don't replace history for cancelled forms
This commit is contained in:
parent
c3e4cbe950
commit
e220f44953
@ -63,8 +63,7 @@ Janet janet_line_getter(int32_t argc, Janet *argv) {
|
||||
gbl_cancel_current_repl_form = false;
|
||||
|
||||
// Signal that the user bailed out of the current form
|
||||
static const char *const msg = "cancel";
|
||||
result = janet_ckeywordv(msg);
|
||||
result = janet_ckeywordv("cancel");
|
||||
} else {
|
||||
result = janet_wrap_buffer(buf);
|
||||
}
|
||||
@ -960,9 +959,6 @@ void janet_line_get(const char *p, JanetBuffer *buffer) {
|
||||
}
|
||||
if (line()) {
|
||||
norawmode();
|
||||
if (gbl_cancel_current_repl_form) {
|
||||
fputc('\n', out);
|
||||
} else {
|
||||
if (gbl_sigint_flag) {
|
||||
raise(SIGINT);
|
||||
} else {
|
||||
@ -970,7 +966,6 @@ void janet_line_get(const char *p, JanetBuffer *buffer) {
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
fflush(stdin);
|
||||
norawmode();
|
||||
fputc('\n', out);
|
||||
|
Loading…
Reference in New Issue
Block a user