modified indicator in tab bar
This commit is contained in:
+7
-1
@@ -32,6 +32,12 @@ fn tab_for(buffer: &Buffer, is_active: bool) -> Span<'static> {
|
||||
Color::ui_grey()
|
||||
};
|
||||
|
||||
Span::from(format!(" {} ", buffer.file_name))
|
||||
let modified_indicator = if buffer.has_unsaved_changes() {
|
||||
"[+]"
|
||||
} else {
|
||||
""
|
||||
};
|
||||
|
||||
Span::from(format!(" {}{modified_indicator} ", buffer.file_name))
|
||||
.bg(background)
|
||||
}
|
||||
|
||||
@@ -19,12 +19,10 @@ const BYTES_PER_CHUNK: usize = 4;
|
||||
const CHUNKS_PER_LINE: usize = BYTES_PER_LINE / BYTES_PER_CHUNK;
|
||||
|
||||
// TODO:
|
||||
// - multiple buffers (tabs)
|
||||
// - search
|
||||
// - modifications
|
||||
// - insert/append
|
||||
// - mode
|
||||
// - how this works with edit history is strange :/
|
||||
// - add to edit history when *leaving* insert mode
|
||||
// - replace-and-keep-going
|
||||
// - mode
|
||||
|
||||
Reference in New Issue
Block a user