labath added inline comments.
================ Comment at: lldb/source/Host/common/Editline.cpp:1051-1052 +unsigned char Editline::TypedCharacter(int ch) { + std::string typed = std::string(1, ch); + typed = typed[0]; + el_insertstr(m_editline, typed.c_str()); ---------------- the second line is redundant. `std::string typed(1, ch)` is enough. (Though I might also consider `const char typed[] = {ch, 0};`) ================ Comment at: lldb/source/Host/common/Editline.cpp:1068-1069 + ansi::FormatAnsiTerminalCodes("${ansi.normal}"); + fprintf(m_output_file, "%s", typed.c_str()); + fprintf(m_output_file, "%s", to_add_color.c_str()); + fflush(m_output_file); ---------------- maybe `fputs(typed.c_str(), m_output_file)` ================ Comment at: lldb/source/Host/common/Editline.cpp:1070 + fprintf(m_output_file, "%s", to_add_color.c_str()); + fflush(m_output_file); + MoveCursor(CursorLocation::BlockEnd, CursorLocation::EditingPrompt); ---------------- Is the flush still necessary after the switch to `m_output_file`? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81001/new/ https://reviews.llvm.org/D81001 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits