buffer movement is now working as I would only wish it would. Needs layers implementation, will do in the future
This commit is contained in:
@@ -48,7 +48,7 @@ pub fn render_buffer_list(
|
||||
let mut current_width = 0;
|
||||
|
||||
for (i, view) in history.iter().enumerate() {
|
||||
let is_active = i == history_len - 1;
|
||||
let is_active = i == app_state.ui.active_buffer_index;
|
||||
let buffer_name = view.display_name();
|
||||
let buffer_text = format!(" {} ", buffer_name);
|
||||
let text_width = UnicodeWidthStr::width(buffer_text.as_str());
|
||||
@@ -60,6 +60,7 @@ pub fn render_buffer_list(
|
||||
}
|
||||
|
||||
if i > 0 {
|
||||
let prev_is_active = i - 1 == app_state.ui.active_buffer_index;
|
||||
let sep_style = if is_active {
|
||||
separator_style_inactive_to_active
|
||||
} else {
|
||||
@@ -73,6 +74,7 @@ pub fn render_buffer_list(
|
||||
spans.push(Span::styled(buffer_text, text_style));
|
||||
current_width += text_width;
|
||||
|
||||
let next_is_active = i + 1 < history_len && i + 1 == app_state.ui.active_buffer_index;
|
||||
let sep_style = if is_active {
|
||||
separator_style_active_to_inactive
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user