Allow commenting lines in command logs

This commit is contained in:
Kovid Goyal 2018-05-19 07:33:29 +05:30
parent 0e327f3d13
commit 5d4e968f50
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -138,7 +138,7 @@ set_dynamic_color = set_color_table_color = write_osc
def replay(raw):
for line in raw.splitlines():
if line.strip():
if line.strip() and not line.startswith('#'):
cmd, rest = line.partition(' ')[::2]
if cmd in {'draw', 'set_title', 'set_icon', 'set_dynamic_color', 'set_color_table_color'}:
globals()[cmd](rest)