mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-25 10:56:19 +04:00
Updated map creation logic
This commit is contained in:
parent
a677e9b53a
commit
f9a03d1b75
@ -683,11 +683,7 @@ pub fn render_bufferline(editor: &Editor, viewport: Rect, surface: &mut Surface)
|
||||
.to_str()
|
||||
.unwrap_or_default();
|
||||
|
||||
if names_map.contains_key(fname) {
|
||||
names_map.insert(fname, names_map.get(fname).unwrap() + 1);
|
||||
} else {
|
||||
names_map.insert(fname, 1);
|
||||
}
|
||||
*names_map.entry(fname).or_insert(0) += 1;
|
||||
}
|
||||
|
||||
for doc in editor.documents() {
|
||||
|
Loading…
Reference in New Issue
Block a user