mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-27 20:25:12 +00:00
rename reader_data_t.interruptible to exit_on_interrupt
This commit is contained in:
parent
55b3cf4627
commit
a3b497b271
3 changed files with 7 additions and 7 deletions
|
@ -2399,7 +2399,7 @@ static int builtin_read(parser_t &parser, wchar_t **argv)
|
||||||
}
|
}
|
||||||
/* No autosuggestions in builtin_read */
|
/* No autosuggestions in builtin_read */
|
||||||
reader_set_allow_autosuggesting(false);
|
reader_set_allow_autosuggesting(false);
|
||||||
reader_set_interruptible(true);
|
reader_set_exit_on_interrupt(true);
|
||||||
|
|
||||||
reader_set_buffer(commandline, wcslen(commandline));
|
reader_set_buffer(commandline, wcslen(commandline));
|
||||||
proc_push_interactive(1);
|
proc_push_interactive(1);
|
||||||
|
|
10
reader.cpp
10
reader.cpp
|
@ -324,7 +324,7 @@ public:
|
||||||
bool screen_reset_needed;
|
bool screen_reset_needed;
|
||||||
|
|
||||||
/** Whether the reader should exit on ^C. */
|
/** Whether the reader should exit on ^C. */
|
||||||
bool interruptible;
|
bool exit_on_interrupt;
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
reader_data_t() :
|
reader_data_t() :
|
||||||
|
@ -343,7 +343,7 @@ public:
|
||||||
search_mode(0),
|
search_mode(0),
|
||||||
repaint_needed(0),
|
repaint_needed(0),
|
||||||
screen_reset_needed(0),
|
screen_reset_needed(0),
|
||||||
interruptible(0)
|
exit_on_interrupt(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -656,7 +656,7 @@ int reader_interrupted()
|
||||||
int reader_reading_interrupted()
|
int reader_reading_interrupted()
|
||||||
{
|
{
|
||||||
int res = reader_interrupted();
|
int res = reader_interrupted();
|
||||||
if (res && data && data->interruptible)
|
if (res && data && data->exit_on_interrupt)
|
||||||
{
|
{
|
||||||
reader_exit(1, 0);
|
reader_exit(1, 0);
|
||||||
parser_t::skip_all_blocks();
|
parser_t::skip_all_blocks();
|
||||||
|
@ -2404,9 +2404,9 @@ void reader_set_test_function(int (*f)(const wchar_t *))
|
||||||
data->test_func = f;
|
data->test_func = f;
|
||||||
}
|
}
|
||||||
|
|
||||||
void reader_set_interruptible(bool i)
|
void reader_set_exit_on_interrupt(bool i)
|
||||||
{
|
{
|
||||||
data->interruptible = i;
|
data->exit_on_interrupt = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
void reader_import_history_if_necessary(void)
|
void reader_import_history_if_necessary(void)
|
||||||
|
|
2
reader.h
2
reader.h
|
@ -197,7 +197,7 @@ void reader_set_right_prompt(const wcstring &prompt);
|
||||||
void reader_set_allow_autosuggesting(bool flag);
|
void reader_set_allow_autosuggesting(bool flag);
|
||||||
|
|
||||||
/** Sets whether the reader should exit on ^C. */
|
/** Sets whether the reader should exit on ^C. */
|
||||||
void reader_set_interruptible(bool flag);
|
void reader_set_exit_on_interrupt(bool flag);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns true if the shell is exiting, 0 otherwise.
|
Returns true if the shell is exiting, 0 otherwise.
|
||||||
|
|
Loading…
Reference in a new issue