File tree 1 file changed +8
-1
lines changed
crates/atuin/src/command/client/search
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -221,8 +221,10 @@ impl DrawState<'_> {
221
221
222
222
fn command ( & mut self , h : & History ) {
223
223
let mut style = self . theme . as_style ( Meaning :: Base ) ;
224
+ let mut row_highlighted = false ;
224
225
if !self . alternate_highlight && ( self . y as usize + self . state . offset == self . state . selected )
225
226
{
227
+ row_highlighted = true ;
226
228
// if not applying alternative highlighting to the whole row, color the command
227
229
style = self . theme . as_style ( Meaning :: AlertError ) ;
228
230
style. attributes . set ( style:: Attribute :: Bold ) ;
@@ -247,7 +249,12 @@ impl DrawState<'_> {
247
249
}
248
250
let mut style = style;
249
251
if highlight_indices. contains ( & pos) {
250
- style. attributes . toggle ( style:: Attribute :: Bold ) ;
252
+ style. attributes . set ( style:: Attribute :: Bold ) ;
253
+ if row_highlighted {
254
+ // if the row is highlighted bold is not enough as the whole row is bold
255
+ // change the color too
256
+ style = self . theme . as_style ( Meaning :: AlertWarn )
257
+ }
251
258
}
252
259
self . draw ( & ch. to_string ( ) , style. into ( ) ) ;
253
260
pos += 1 ;
You can’t perform that action at this time.
0 commit comments