about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-01-13 15:27:48 -0500
committerDrew DeVault <sir@cmpwn.com>2019-01-13 15:27:48 -0500
commit24196d2c6fecae4b6bb52dfec14ac9d7e4bd40d4 (patch)
treed47b8ea1654a5627811df1e5ad5c5cfd172358fc
parent60284850f22624a03996e882fcfd6aeb2af88b93 (diff)
downloadaerc-24196d2c6fecae4b6bb52dfec14ac9d7e4bd40d4.tar.gz
Revert "Render selected list item differently"
This reverts commit 60284850f22624a03996e882fcfd6aeb2af88b93.
-rw-r--r--lib/ui/list.go1
-rw-r--r--widgets/directories.go10
2 files changed, 3 insertions, 8 deletions
diff --git a/lib/ui/list.go b/lib/ui/list.go
index 9caae20..58f304f 100644
--- a/lib/ui/list.go
+++ b/lib/ui/list.go
@@ -88,7 +88,6 @@ func (list *List) Select(index int) {
 		panic(fmt.Errorf("Attempted to select unknown child"))
 	}
 	list.selected = index
-	list.Items[list.selected].invalid = true
 	list.Invalidate()
 }
 
diff --git a/widgets/directories.go b/widgets/directories.go
index d765ac2..ff2f6f5 100644
--- a/widgets/directories.go
+++ b/widgets/directories.go
@@ -53,7 +53,6 @@ func (dirlist *DirectoryList) UpdateList() {
 					return strings.Compare(string(a), string(b)) > 0
 				})
 				dirlist.dirs.Set(dirs)
-				dirlist.dirs.Select(0)
 			}
 		})
 }
@@ -85,10 +84,7 @@ func (d directoryEntry) Draw(ctx *ui.Context) {
 }
 
 func (d directoryEntry) DrawWithSelected(ctx *ui.Context, selected bool) {
-	style := tcell.StyleDefault
-	if selected {
-		style = style.Background(tcell.ColorWhite).Foreground(tcell.ColorBlack)
-	}
-	ctx.Fill(0, 0, ctx.Width(), ctx.Height(), ' ', style)
-	ctx.Printf(0, 0, style, "%s", d)
+	// TODO: distinguish the selected item
+	ctx.Fill(0, 0, ctx.Width(), ctx.Height(), ' ', tcell.StyleDefault)
+	ctx.Printf(0, 0, tcell.StyleDefault, "%s", d)
 }
class='oid'>e6cbe9c ^
dc5c070 ^


e6cbe9c ^
e743836 ^
c518345 ^


b439892 ^
c2ac851 ^

7e597ae ^
901b3ed ^
1076f2b

901b3ed ^
0c3544d ^
2b35fae ^

a3e3f0b ^

2b35fae ^
3e06ede ^

2dd5212 ^





292ccc4 ^
d4b7a9a ^
3e06ede ^


1836b67 ^











2b35fae ^
72655f0 ^
df74b26 ^


72655f0 ^
df74b26 ^
72655f0 ^
3e06ede ^
72655f0 ^
df74b26 ^
3af6434 ^
3e06ede ^
3af6434 ^
df74b26 ^








72655f0 ^

3e06ede ^
72655f0 ^
6499fc4 ^





bab575c ^
1549faf ^
3af6434 ^

3e06ede ^
1549faf ^
bab575c ^
df74b26 ^




45aea23 ^



df74b26 ^






1549faf ^
bab575c ^
df74b26 ^

1549faf ^
bab575c ^
daae3bb ^


bab575c ^
3e06ede ^


4bb89e2 ^
df74b26 ^


2b35fae ^
0c3544d ^
0e5c819 ^
4bd0d33 ^
0e5c819 ^
df74b26 ^


0e5c819 ^
4bd0d33 ^




df74b26 ^


4bd0d33 ^
0e5c819 ^
4bd0d33 ^
0e5c819 ^
df74b26 ^


0c3544d ^

dc5c070 ^

4bb89e2 ^
60b3dce ^
3e06ede ^
4bb89e2 ^




3e06ede ^
5ef6ef1 ^

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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177