mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 04:01:38 +08:00
Finish removing R_NULL
This commit is contained in:
parent
28b79a2c88
commit
14663089c8
|
@ -263,7 +263,7 @@ static maybe_t<char_event_t> interrupt_handler() {
|
|||
return char_event_t{vintr};
|
||||
}
|
||||
|
||||
return char_event_t{R_NULL};
|
||||
return char_event_t{char_event_type_t::check_exit};
|
||||
}
|
||||
|
||||
static std::atomic<bool> input_initialized{false};
|
||||
|
|
|
@ -197,8 +197,6 @@ char_event_t input_common_readch() {
|
|||
}
|
||||
|
||||
wint_t b = evt.get_char();
|
||||
if (b >= R_NULL && b < R_END_INPUT_FUNCTIONS) return b;
|
||||
|
||||
if (MB_CUR_MAX == 1) {
|
||||
return b; // single-byte locale, all values are legal
|
||||
}
|
||||
|
|
|
@ -11,9 +11,8 @@
|
|||
|
||||
enum {
|
||||
R_MIN = INPUT_COMMON_BASE,
|
||||
R_NULL = R_MIN,
|
||||
|
||||
R_BEGINNING_OF_LINE,
|
||||
R_BEGINNING_OF_LINE = R_MIN,
|
||||
R_END_OF_LINE,
|
||||
R_FORWARD_CHAR,
|
||||
R_BACKWARD_CHAR,
|
||||
|
|
|
@ -1044,7 +1044,6 @@ static bool command_ends_paging(wchar_t c, bool focused_on_search_field) {
|
|||
case R_FORWARD_CHAR:
|
||||
case R_UP_LINE:
|
||||
case R_DOWN_LINE:
|
||||
case R_NULL:
|
||||
case R_REPAINT:
|
||||
case R_SUPPRESS_AUTOSUGGESTION:
|
||||
case R_BEGINNING_OF_HISTORY:
|
||||
|
@ -2502,7 +2501,8 @@ maybe_t<wcstring> reader_data_t::readline(int nchars) {
|
|||
}
|
||||
|
||||
if (!event_needing_handling || event_needing_handling->is_check_exit()) {
|
||||
event_needing_handling = R_NULL;
|
||||
repaint_if_needed();
|
||||
continue;
|
||||
} else if (event_needing_handling->is_eof()) {
|
||||
reader_force_exit();
|
||||
continue;
|
||||
|
@ -2562,9 +2562,6 @@ maybe_t<wcstring> reader_data_t::readline(int nchars) {
|
|||
reader_repaint_needed();
|
||||
break;
|
||||
}
|
||||
case R_NULL: {
|
||||
break;
|
||||
}
|
||||
case R_CANCEL: {
|
||||
// The only thing we can cancel right now is paging, which we handled up above.
|
||||
break;
|
||||
|
@ -3267,7 +3264,7 @@ maybe_t<wcstring> reader_data_t::readline(int nchars) {
|
|||
|
||||
if ((c != R_HISTORY_SEARCH_BACKWARD) && (c != R_HISTORY_SEARCH_FORWARD) &&
|
||||
(c != R_HISTORY_TOKEN_SEARCH_BACKWARD) && (c != R_HISTORY_TOKEN_SEARCH_FORWARD) &&
|
||||
(c != R_NULL) && (c != R_REPAINT) && (c != R_FORCE_REPAINT)) {
|
||||
(c != R_REPAINT) && (c != R_FORCE_REPAINT)) {
|
||||
history_search.reset();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user