Commit Diff


commit - 0e6183abe42a33cdf46ac3d4ff52f1dbe8251982
commit + cee823637088fe32b599f64e68987a55a420f706
blob - 8ac5fc6be7ccffdbf7dc9bbc4ef7337e23bf42fa
blob + f5c1124f151d89f0b0239cec4e4410e95398b808
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,7 @@
+2021-07-21  Omar Polo  <op@omarpolo.com>
+
+	* cmd.c (cmd_tab_close): prefer the next tab instead of the previous as target in tab-close.
+
 2021-07-20  Omar Polo  <op@omarpolo.com>
 
 	* cmd.c (cmd_push_button_new_tab): bugfix: push-button-new-tab on relative URLs now works
blob - 9378cdf41912ed6de687495984024459f23472c3
blob + e764b8bc6ec95f6c30068a3abe73794e998e902f
--- cmd.c
+++ cmd.c
@@ -428,8 +428,8 @@ cmd_tab_close(struct buffer *buffer)
 
 	stop_tab(tab);
 
-	if ((t = TAILQ_PREV(tab, tabshead, tabs)) == NULL)
-		t = TAILQ_NEXT(tab, tabs);
+	if ((t = TAILQ_NEXT(tab, tabs)) == NULL)
+		t =TAILQ_PREV(tab, tabshead, tabs);
 	TAILQ_REMOVE(&tabshead, tab, tabs);
 	free(tab);