File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -1160,7 +1160,10 @@ class Source(Dashboard.Module):
1160
1160
self .offset = 0
1161
1161
1162
1162
def label (self ):
1163
- return 'Source'
1163
+ label = 'Source'
1164
+ if self .show_path and self .file_name :
1165
+ label += ': {}' .format (self .file_name )
1166
+ return label
1164
1167
1165
1168
def lines (self , term_width , term_height , style_changed ):
1166
1169
# skip if the current thread is not stopped
@@ -1170,6 +1173,7 @@ class Source(Dashboard.Module):
1170
1173
sal = gdb .selected_frame ().find_sal ()
1171
1174
current_line = sal .line
1172
1175
if current_line == 0 :
1176
+ self .file_name = None
1173
1177
return []
1174
1178
# try to lookup the source file
1175
1179
candidates = [
@@ -1286,6 +1290,12 @@ A value of 0 uses the whole height.''',
1286
1290
'type' : int ,
1287
1291
'check' : check_gt_zero
1288
1292
},
1293
+ 'path' : {
1294
+ 'doc' : 'Path visibility flag in the module label.' ,
1295
+ 'default' : False ,
1296
+ 'name' : 'show_path' ,
1297
+ 'type' : bool
1298
+ },
1289
1299
'highlight-line' : {
1290
1300
'doc' : 'Decide whether the whole current line should be highlighted.' ,
1291
1301
'default' : False ,
You can’t perform that action at this time.
0 commit comments