Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Wootten authored and Jeremy Wootten committed Jan 2, 2025
1 parent 696327a commit 6df2b1b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Widgets/TerminalView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,7 @@ public class Terminal.TerminalView : Gtk.Box {
public void cycle_tabs (Hdy.NavigationDirection direction) {
var pos = tab_view.get_page_position (selected_page);
pos = direction == FORWARD ? pos + 1 : pos - 1;
if (pos == n_pages) {
pos = 0;
} else if (pos < 0) {
pos = (int) n_pages - 1;
}
pos = (pos + n_pages) % n_pages;

selected_page = tab_view.get_nth_page (pos);
}
Expand Down

0 comments on commit 6df2b1b

Please sign in to comment.