|
|
@@ -677,6 +677,22 @@ void TuiEditor::render_message_line() {
|
|
|
} else if (!message_line_.empty()) {
|
|
|
// Display transient message with truncation if needed
|
|
|
std::string display_msg = message_line_;
|
|
|
+
|
|
|
+ // Handle multi-line messages: show first line + indicator
|
|
|
+ size_t newline_pos = display_msg.find('\n');
|
|
|
+ if (newline_pos != std::string::npos) {
|
|
|
+ // Count lines
|
|
|
+ size_t line_count = 1;
|
|
|
+ size_t pos = 0;
|
|
|
+ while ((pos = display_msg.find('\n', pos)) != std::string::npos) {
|
|
|
+ ++line_count;
|
|
|
+ ++pos;
|
|
|
+ }
|
|
|
+ // Show first line with line count indicator
|
|
|
+ display_msg = display_msg.substr(0, newline_pos) +
|
|
|
+ " [+" + std::to_string(line_count - 1) + " lines, C-h e]";
|
|
|
+ }
|
|
|
+
|
|
|
const std::string suffix = "...[C-h e]";
|
|
|
int available_width = width_ - 1;
|
|
|
|