Clone in a terminal:
Commit 4c128cf
Johan Mattsson - 2021-12-16T22:05:19+00:00
4c128cf3e1952872ecc19685719986131646aff1johan.mattsson.m@gmail.com

Fix tab insert bug

Changed files (1)

Diff

diff --git a/libbirdfont/TabBar.vala b/libbirdfont/TabBar.valaindex 97591e5..ed93f8f 100644--- a/libbirdfont/TabBar.vala+++ b/libbirdfont/TabBar.vala@@ -593,7 +593,13 @@ public class TabBar : GLib.Object { 			tab_width += 36; 		} 		-		tab = new Tab (display_item, tab_width, always_open);		+		tab = new Tab (display_item, tab_width, always_open);+	+		if (position >= tabs.size) {+			warning (@"Tab index out of bounds, position: $position tabs: $(tabs.size)");+			position = 0;+		}+				 		tabs.insert (position, tab); 		 		if (gc != null) {

Contact

Email: johan.mattsson.m@gmail.com
Mastodon: typo.social/@birdfont
GitHub: johanmattssonm
LinkedIn: johan-mattsson-2ab324112