Loading adb/client/line_printer.cpp +12 −3 Original line number Diff line number Diff line Loading @@ -67,7 +67,11 @@ static void Out(const std::string& s) { void LinePrinter::Print(string to_print, LineType type) { if (!smart_terminal_) { if (type == LineType::INFO) { info_line_ = to_print + "\n"; } else { Out(to_print + "\n"); } return; } Loading Loading @@ -123,6 +127,11 @@ void LinePrinter::Print(string to_print, LineType type) { } void LinePrinter::KeepInfoLine() { if (smart_terminal_) { if (!have_blank_line_) Out("\n"); have_blank_line_ = true; } else { Out(info_line_); info_line_.clear(); } } adb/client/line_printer.h +3 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,9 @@ struct LinePrinter { /// Whether the caret is at the beginning of a blank line. bool have_blank_line_; /// The last printed info line when printing to a dumb terminal. std::string info_line_; #ifdef _WIN32 void* console_; #endif Loading Loading
adb/client/line_printer.cpp +12 −3 Original line number Diff line number Diff line Loading @@ -67,7 +67,11 @@ static void Out(const std::string& s) { void LinePrinter::Print(string to_print, LineType type) { if (!smart_terminal_) { if (type == LineType::INFO) { info_line_ = to_print + "\n"; } else { Out(to_print + "\n"); } return; } Loading Loading @@ -123,6 +127,11 @@ void LinePrinter::Print(string to_print, LineType type) { } void LinePrinter::KeepInfoLine() { if (smart_terminal_) { if (!have_blank_line_) Out("\n"); have_blank_line_ = true; } else { Out(info_line_); info_line_.clear(); } }
adb/client/line_printer.h +3 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,9 @@ struct LinePrinter { /// Whether the caret is at the beginning of a blank line. bool have_blank_line_; /// The last printed info line when printing to a dumb terminal. std::string info_line_; #ifdef _WIN32 void* console_; #endif Loading