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()
|
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)
|
.bg(background)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,12 +19,10 @@ const BYTES_PER_CHUNK: usize = 4;
|
|||||||
const CHUNKS_PER_LINE: usize = BYTES_PER_LINE / BYTES_PER_CHUNK;
|
const CHUNKS_PER_LINE: usize = BYTES_PER_LINE / BYTES_PER_CHUNK;
|
||||||
|
|
||||||
// TODO:
|
// TODO:
|
||||||
// - multiple buffers (tabs)
|
|
||||||
// - search
|
// - search
|
||||||
// - modifications
|
// - modifications
|
||||||
// - insert/append
|
// - insert/append
|
||||||
// - mode
|
// - mode
|
||||||
// - how this works with edit history is strange :/
|
|
||||||
// - add to edit history when *leaving* insert mode
|
// - add to edit history when *leaving* insert mode
|
||||||
// - replace-and-keep-going
|
// - replace-and-keep-going
|
||||||
// - mode
|
// - mode
|
||||||
|
|||||||
Reference in New Issue
Block a user