summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ui/tab.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/ui/tab.go b/lib/ui/tab.go
index a9b24a9..6ee5575 100644
--- a/lib/ui/tab.go
+++ b/lib/ui/tab.go
@@ -57,13 +57,18 @@ func (tabs *Tabs) invalidateChild(d Drawable) {
 }
 
 func (tabs *Tabs) Remove(content Drawable) {
+	match := false
 	for i, tab := range tabs.Tabs {
 		if tab.Content == content {
 			tabs.Tabs = append(tabs.Tabs[:i], tabs.Tabs[i+1:]...)
 			tabs.removeHistory(i)
+			match = true
 			break
 		}
 	}
+	if !match {
+		return
+	}
 	index, ok := tabs.popHistory()
 	if ok {
 		tabs.Select(index)
<vc@akkartik.com> 2016-09-12 21:02:38 -0700 3343' href='/akkartik/mu/commit/059to_text.mu?h=hlt&id=db01afa844004406da3a6ab9b306219c807e057e'>db01afa8 ^
a0331a9b ^
431bbb1a ^
db01afa8 ^

b75d9d45 ^

08f4628e ^
b75d9d45 ^






08f4628e ^

a0331a9b ^
b75d9d45 ^



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48