mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-30 16:35:16 +08:00
parent
f3da54d99c
commit
e6863a90c8
@ -1438,6 +1438,9 @@ static void reader_flash() {
|
||||
|
||||
reader_repaint();
|
||||
ignore_result(write(STDOUT_FILENO, "\a", 1));
|
||||
// The write above changed the timestamp of stdout; ensure we don't therefore reset our screen.
|
||||
// See #3693.
|
||||
s_save_status(&data->screen);
|
||||
|
||||
pollint.tv_sec = 0;
|
||||
pollint.tv_nsec = 100 * 1000000;
|
||||
|
@ -352,7 +352,7 @@ static size_t calc_prompt_lines(const wcstring &prompt) {
|
||||
|
||||
/// Stat stdout and stderr and save result. This should be done before calling a function that may
|
||||
/// cause output.
|
||||
static void s_save_status(screen_t *s) {
|
||||
void s_save_status(screen_t *s) {
|
||||
fstat(1, &s->prev_buff_1);
|
||||
fstat(2, &s->prev_buff_2);
|
||||
}
|
||||
|
@ -181,6 +181,9 @@ void s_write(screen_t *s, const wcstring &left_prompt, const wcstring &right_pro
|
||||
/// line of garbage for every repaint, which will quickly fill the screen.
|
||||
void s_reset(screen_t *s, bool reset_cursor, bool reset_prompt = true);
|
||||
|
||||
/// Stat stdout and stderr and save result as the current timestamp.
|
||||
void s_save_status(screen_t *s);
|
||||
|
||||
enum screen_reset_mode_t {
|
||||
/// Do not make a new line, do not repaint the prompt.
|
||||
screen_reset_current_line_contents,
|
||||
|
Loading…
x
Reference in New Issue
Block a user