diff --git a/src/screen.cpp b/src/screen.cpp index 6e565dcf9..da5c2803d 100644 --- a/src/screen.cpp +++ b/src/screen.cpp @@ -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(),