File tree 1 file changed +11
-3
lines changed
1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,7 @@ type Theme struct {
122
122
pm Style
123
123
highlight Style
124
124
names * Palette
125
+ useID bool
125
126
}
126
127
127
128
func (theme Theme ) ID () string {
@@ -130,11 +131,17 @@ func (theme Theme) ID() string {
130
131
131
132
// Colorize name string given some index
132
133
func (theme Theme ) ColorName (u * User ) string {
134
+ var name string
135
+ if theme .useID {
136
+ name = u .ID ()
137
+ } else {
138
+ name = u .Name ()
139
+ }
133
140
if theme .names == nil {
134
- return u . Name ()
141
+ return name
135
142
}
136
143
137
- return theme .names .Get (u .colorIdx ).Format (u . Name () )
144
+ return theme .names .Get (u .colorIdx ).Format (name )
138
145
}
139
146
140
147
// Colorize the PM string
@@ -226,7 +233,8 @@ func init() {
226
233
highlight : style (Bold + "\033 [48;5;22m\033 [38;5;46m" ), // Green on dark green
227
234
},
228
235
{
229
- id : "mono" ,
236
+ id : "mono" ,
237
+ useID : true ,
230
238
},
231
239
}
232
240
You can’t perform that action at this time.
0 commit comments