mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Fix clearing abandoned line with VTE (#4243)
Turns out the segfaults we've been getting in our tests are because we set $TERM to "dumb".
So we only clear the line if the terminal isn't dumb.
This reverts commit 745a88f2f6
.
Fixes #2320.
This commit is contained in:
parent
21890ccac7
commit
e35d248f64
1 changed files with 3 additions and 1 deletions
|
@ -1196,7 +1196,9 @@ void s_reset(screen_t *s, screen_reset_mode_t mode) {
|
|||
// line above your prompt. This doesn't make a difference in normal usage, but copying and
|
||||
// pasting your terminal log becomes a pain. This commit clears that line, making it an
|
||||
// actual empty line.
|
||||
abandon_line_string.append(L"\e[2K");
|
||||
if (!is_dumb()) {
|
||||
abandon_line_string.append(str2wcstring(clr_eol));
|
||||
}
|
||||
|
||||
const std::string narrow_abandon_line_string = wcs2string(abandon_line_string);
|
||||
write_loop(STDOUT_FILENO, narrow_abandon_line_string.c_str(),
|
||||
|
|
Loading…
Reference in a new issue