File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ See the `prompt` attribute. This value is used as a Python format string.''',
192
192
class Beautifier ():
193
193
194
194
def __init__ (self , hint , tab_size = 4 ):
195
- self .tab_spaces = ' ' * tab_size
195
+ self .tab_spaces = ' ' * tab_size if tab_size else None
196
196
self .active = False
197
197
if not R .ansi or not R .syntax_highlighting :
198
198
return
@@ -218,8 +218,9 @@ class Beautifier():
218
218
pass
219
219
220
220
def process (self , source ):
221
- # convert tabs anyway
222
- source = source .replace ('\t ' , self .tab_spaces )
221
+ # convert tabs if requested
222
+ if self .tab_spaces :
223
+ source = source .replace ('\t ' , self .tab_spaces )
223
224
if self .active :
224
225
import pygments
225
226
source = pygments .highlight (source , self .lexer , self .formatter )
@@ -1324,7 +1325,7 @@ The instructions constituting the current statement are marked, if available.'''
1324
1325
flavor = gdb .parameter ('disassembly-flavor' )
1325
1326
except :
1326
1327
flavor = 'att' # not always defined (see #36)
1327
- highlighter = Beautifier (flavor )
1328
+ highlighter = Beautifier (flavor , tab_size = None )
1328
1329
# fetch the assembly code
1329
1330
line_info = None
1330
1331
frame = gdb .selected_frame () # PC is here
You can’t perform that action at this time.
0 commit comments