Skip to content

Commit

Permalink
fix: hide separator on last tab when truncated
Browse files Browse the repository at this point in the history
  • Loading branch information
dj95 committed Jul 6, 2024
1 parent 1a717ca commit 0cbcde9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/widgets/tabs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ impl Widget for TabsWidget {

output = format!("{}{}", output, content);

if counter < state.tabs.len() {
if counter < tabs.len() {
if let Some(sep) = &self.separator {
output = format!("{}{}", output, sep.format_string(&sep.content));
}
Expand Down Expand Up @@ -186,7 +186,7 @@ impl Widget for TabsWidget {

let mut rendered_content = self.render_tab(tab, &state.panes, &state.mode);

if counter < state.tabs.len() {
if counter < tabs.len() {
if let Some(sep) = &self.separator {
rendered_content =
format!("{}{}", rendered_content, sep.format_string(&sep.content));
Expand Down

0 comments on commit 0cbcde9

Please sign in to comment.