update unsaved changes alert

This commit is contained in:
alice pellerin
2026-05-02 01:32:28 -05:00
parent e94c70fa9e
commit 7b5d56dd92
2 changed files with 11 additions and 13 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ impl App {
self.quit();
} else {
self.buffers[self.current_buffer_index].alert_message = Span::from(
"there are unsaved changes, use Q to override"
"unsaved changes, use <space>w to save or Q to override"
).red();
}
}
+2 -4
View File
@@ -1,9 +1,8 @@
use crate::{buffer::{Buffer, Mode}, utilities::CustomGreys};
use ratatui::{style::{Color, Stylize}, text::{Line, Span, Text}};
use ratatui::{style::{Color, Stylize}, text::{Line, Span}};
impl Buffer {
pub fn render_status_line(&self) -> Text<'_> {
Text::from(
pub fn render_status_line(&self) -> Line<'_> {
Line::from_iter([
self.render_mode(),
" ".into(),
@@ -12,7 +11,6 @@ impl Buffer {
" ".into(),
self.alert_message.clone()
])
)
.bg(Color::ui_grey())
}