mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-28 04:51:15 -03:00
Replace \e with \x1B, as the former is a gcc extension
While supported by gcc and clang, \e is a gcc-specific extension and not formally defined in the C or C++ standards. See [0] for a list of valid escapes. [0]: https://stackoverflow.com/a/10220539/17027
This commit is contained in:
@@ -687,7 +687,7 @@ void reader_write_title(const wcstring &cmd, bool reset_cursor_position) {
|
||||
proc_push_interactive(0);
|
||||
if (exec_subshell(fish_title_command, lst, false /* ignore exit status */) != -1 &&
|
||||
!lst.empty()) {
|
||||
fputws(L"\e]0;", stdout);
|
||||
fputws(L"\x1B]0;", stdout);
|
||||
for (size_t i = 0; i < lst.size(); i++) {
|
||||
fputws(lst.at(i).c_str(), stdout);
|
||||
}
|
||||
@@ -2687,7 +2687,7 @@ const wchar_t *reader_readline(int nchars) {
|
||||
break;
|
||||
}
|
||||
// Escape was pressed.
|
||||
case L'\e': {
|
||||
case L'\x1B': {
|
||||
if (data->search_mode != history_search_mode_t::none) {
|
||||
data->search_mode = history_search_mode_t::none;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user