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(); self.quit();
} else { } else {
self.buffers[self.current_buffer_index].alert_message = Span::from( 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(); ).red();
} }
} }
+2 -4
View File
@@ -1,9 +1,8 @@
use crate::{buffer::{Buffer, Mode}, utilities::CustomGreys}; 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 { impl Buffer {
pub fn render_status_line(&self) -> Text<'_> { pub fn render_status_line(&self) -> Line<'_> {
Text::from(
Line::from_iter([ Line::from_iter([
self.render_mode(), self.render_mode(),
" ".into(), " ".into(),
@@ -12,7 +11,6 @@ impl Buffer {
" ".into(), " ".into(),
self.alert_message.clone() self.alert_message.clone()
]) ])
)
.bg(Color::ui_grey()) .bg(Color::ui_grey())
} }