@@ -182,21 +182,31 @@ impl Revlog {
182
182
let splitter =
183
183
Text :: Styled ( splitter_txt, theme. text ( true , selected) ) ;
184
184
185
+ // commit hash
185
186
txt. push ( Text :: Styled (
186
187
Cow :: from ( & e. hash [ 0 ..7 ] ) ,
187
188
theme. commit_hash ( selected) ,
188
189
) ) ;
190
+
189
191
txt. push ( splitter. clone ( ) ) ;
192
+
193
+ // commit timestamp
190
194
txt. push ( Text :: Styled (
191
195
Cow :: from ( e. time . as_str ( ) ) ,
192
196
theme. commit_time ( selected) ,
193
197
) ) ;
198
+
194
199
txt. push ( splitter. clone ( ) ) ;
200
+
201
+ // commit author
195
202
txt. push ( Text :: Styled (
196
203
Cow :: from ( e. author . as_str ( ) ) ,
197
204
theme. commit_author ( selected) ,
198
205
) ) ;
206
+
199
207
txt. push ( splitter. clone ( ) ) ;
208
+
209
+ // commit tags
200
210
txt. push ( Text :: Styled (
201
211
Cow :: from ( if let Some ( tags) = tags {
202
212
format ! ( " {}" , tags)
@@ -205,7 +215,10 @@ impl Revlog {
205
215
} ) ,
206
216
theme. tab ( true ) . bg ( theme. text ( true , selected) . bg ) ,
207
217
) ) ;
218
+
208
219
txt. push ( splitter) ;
220
+
221
+ // commit msg
209
222
txt. push ( Text :: Styled (
210
223
Cow :: from ( e. msg . as_str ( ) ) ,
211
224
theme. text ( true , selected) ,
@@ -216,7 +229,7 @@ impl Revlog {
216
229
fn get_text ( & self , height : usize ) -> Vec < Text > {
217
230
let selection = self . relative_selection ( ) ;
218
231
219
- let mut txt = Vec :: new ( ) ;
232
+ let mut txt = Vec :: with_capacity ( height ) ;
220
233
221
234
for ( idx, e) in self
222
235
. items
@@ -230,6 +243,7 @@ impl Revlog {
230
243
} else {
231
244
None
232
245
} ;
246
+
233
247
Self :: add_entry (
234
248
e,
235
249
idx + self . scroll_top == selection,
0 commit comments