1
0
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:
Miciah Dashiel Butler Masters 2006-05-15 19:57:46 +00:00 committed by Miciah Dashiel Butler Masters
parent 408f9174a8
commit 3ee31b956a

View File

@ -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;
}