@@ -1226,8 +1226,8 @@ class Source(Dashboard.Module):
1226
1226
if int (number ) == current_line :
1227
1227
# the current line has a different style without ANSI
1228
1228
if R .ansi :
1229
- if self .highlighted :
1230
- line_format = '{}' + ansi (number_format , R .style_selected_1 ) + ' {}'
1229
+ if self .highlighted and not self . highlight_line :
1230
+ line_format = '{}' + ansi (number_format , R .style_selected_1 ) + ' {}'
1231
1231
else :
1232
1232
line_format = '{}' + ansi (number_format + ' {}' , R .style_selected_1 )
1233
1233
else :
@@ -1282,6 +1282,12 @@ A value of 0 uses the whole height.''',
1282
1282
'name' : 'tab_size' ,
1283
1283
'type' : int ,
1284
1284
'check' : check_gt_zero
1285
+ },
1286
+ 'highlight-line' : {
1287
+ 'doc' : 'Decide whether the whole current line should be highlighted.' ,
1288
+ 'default' : False ,
1289
+ 'name' : 'highlight_line' ,
1290
+ 'type' : bool
1285
1291
}
1286
1292
}
1287
1293
@@ -1407,7 +1413,7 @@ The instructions constituting the current statement are marked, if available.'''
1407
1413
indicator = ansi (indicator , R .style_selected_1 )
1408
1414
opcodes = ansi (opcodes , R .style_selected_1 )
1409
1415
func_info = ansi (func_info , R .style_selected_1 )
1410
- if not highlighter .active :
1416
+ if not highlighter .active or self . highlight_line :
1411
1417
text = ansi (text , R .style_selected_1 )
1412
1418
elif line_info and line_info .pc <= addr < line_info .last :
1413
1419
if not R .ansi :
@@ -1416,7 +1422,7 @@ The instructions constituting the current statement are marked, if available.'''
1416
1422
indicator = ansi (indicator , R .style_selected_2 )
1417
1423
opcodes = ansi (opcodes , R .style_selected_2 )
1418
1424
func_info = ansi (func_info , R .style_selected_2 )
1419
- if not highlighter .active :
1425
+ if not highlighter .active or self . highlight_line :
1420
1426
text = ansi (text , R .style_selected_2 )
1421
1427
else :
1422
1428
addr_str = ansi (addr_str , R .style_low )
@@ -1470,6 +1476,12 @@ A value of 0 uses the whole height.''',
1470
1476
'default' : True ,
1471
1477
'name' : 'show_function' ,
1472
1478
'type' : bool
1479
+ },
1480
+ 'highlight-line' : {
1481
+ 'doc' : 'Decide whether the whole current line should be highlighted.' ,
1482
+ 'default' : False ,
1483
+ 'name' : 'highlight_line' ,
1484
+ 'type' : bool
1473
1485
}
1474
1486
}
1475
1487
0 commit comments