mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Fix wraparound behaviour in switch_to_tab
This commit is contained in:
parent
408f9174a8
commit
3ee31b956a
@ -139,14 +139,14 @@ switch_to_tab(struct terminal *term, int tab, int tabs)
|
||||
if (tabs > 1) {
|
||||
if (tab >= tabs) {
|
||||
if (get_opt_bool("ui.tabs.wraparound"))
|
||||
tab = 0;
|
||||
tab = tab % tabs;
|
||||
else
|
||||
tab = tabs - 1;
|
||||
}
|
||||
|
||||
if (tab < 0) {
|
||||
if (get_opt_bool("ui.tabs.wraparound"))
|
||||
tab = tabs - 1;
|
||||
tab = tabs + tab % tabs;
|
||||
else
|
||||
tab = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user