mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-05 00:01:15 -03:00
terminal: name some enum fields
This commit is contained in:
@@ -863,8 +863,9 @@ fn read_i(parser: &Parser) {
|
|||||||
data.exit_loop_requested |= parser.libdata().exit_current_script;
|
data.exit_loop_requested |= parser.libdata().exit_current_script;
|
||||||
parser.libdata_mut().exit_current_script = false;
|
parser.libdata_mut().exit_current_script = false;
|
||||||
|
|
||||||
BufferedOutputter::new(Outputter::stdoutput())
|
BufferedOutputter::new(Outputter::stdoutput()).write_command(Osc133CommandFinished {
|
||||||
.write_command(Osc133CommandFinished(parser.get_last_status()));
|
exit_status: parser.get_last_status(),
|
||||||
|
});
|
||||||
event::fire_generic(parser, L!("fish_postexec").to_owned(), vec![command]);
|
event::fire_generic(parser, L!("fish_postexec").to_owned(), vec![command]);
|
||||||
// Allow any pending history items to be returned in the history array.
|
// Allow any pending history items to be returned in the history array.
|
||||||
data.history.resolve_pending();
|
data.history.resolve_pending();
|
||||||
|
|||||||
@@ -569,7 +569,9 @@ pub fn push_to_scrollback(&mut self) {
|
|||||||
}
|
}
|
||||||
let mut out = BufferedOutputter::new(self.outp);
|
let mut out = BufferedOutputter::new(self.outp);
|
||||||
// Move everything to scrollback.
|
// Move everything to scrollback.
|
||||||
out.write_command(ScrollContentUp(lines_to_scroll));
|
out.write_command(ScrollContentUp {
|
||||||
|
lines: lines_to_scroll,
|
||||||
|
});
|
||||||
// Reposition cursor.
|
// Reposition cursor.
|
||||||
out.write_command(CursorMove(CardinalDirection::Up, lines_to_scroll));
|
out.write_command(CursorMove(CardinalDirection::Up, lines_to_scroll));
|
||||||
self.set_position_in_viewport("scrollback-push", Some(0));
|
self.set_position_in_viewport("scrollback-push", Some(0));
|
||||||
|
|||||||
@@ -105,12 +105,12 @@ pub(crate) enum TerminalCommand<'a> {
|
|||||||
Osc133PromptStart,
|
Osc133PromptStart,
|
||||||
Osc133PromptEnd,
|
Osc133PromptEnd,
|
||||||
Osc133CommandStart(&'a wstr),
|
Osc133CommandStart(&'a wstr),
|
||||||
Osc133CommandFinished(libc::c_int),
|
Osc133CommandFinished { exit_status: libc::c_int },
|
||||||
|
|
||||||
// Other terminal features
|
// Other terminal features
|
||||||
QueryCursorPosition,
|
QueryCursorPosition,
|
||||||
QueryBackgroundColor,
|
QueryBackgroundColor,
|
||||||
ScrollContentUp(usize),
|
ScrollContentUp { lines: usize },
|
||||||
|
|
||||||
DecsetShowCursor,
|
DecsetShowCursor,
|
||||||
DecsetFocusReporting,
|
DecsetFocusReporting,
|
||||||
@@ -184,10 +184,10 @@ fn write(out: &mut impl Output, sequence: &'static [u8]) -> bool {
|
|||||||
Osc133PromptStart => osc_133_prompt_start(self),
|
Osc133PromptStart => osc_133_prompt_start(self),
|
||||||
Osc133PromptEnd => osc_133_prompt_end(self),
|
Osc133PromptEnd => osc_133_prompt_end(self),
|
||||||
Osc133CommandStart(command) => osc_133_command_start(self, command),
|
Osc133CommandStart(command) => osc_133_command_start(self, command),
|
||||||
Osc133CommandFinished(s) => osc_133_command_finished(self, s),
|
Osc133CommandFinished { exit_status } => osc_133_command_finished(self, exit_status),
|
||||||
QueryCursorPosition => write(self, b"\x1b[6n"),
|
QueryCursorPosition => write(self, b"\x1b[6n"),
|
||||||
QueryBackgroundColor => write(self, b"\x1b]11;?\x1b\\"),
|
QueryBackgroundColor => write(self, b"\x1b]11;?\x1b\\"),
|
||||||
ScrollContentUp(lines) => scroll_content_up(self, lines),
|
ScrollContentUp { lines } => scroll_content_up(self, lines),
|
||||||
DecsetShowCursor => write(self, b"\x1b[?25h"),
|
DecsetShowCursor => write(self, b"\x1b[?25h"),
|
||||||
DecsetFocusReporting => write(self, b"\x1b[?1004h"),
|
DecsetFocusReporting => write(self, b"\x1b[?1004h"),
|
||||||
DecrstFocusReporting => write(self, b"\x1b[?1004l"),
|
DecrstFocusReporting => write(self, b"\x1b[?1004l"),
|
||||||
|
|||||||
Reference in New Issue
Block a user