fix bug index out of range (#210)

pull/212/head
kelianchun 2016-04-22 11:49:50 +08:00 committed by ibuler
parent 9096a6e5b8
commit 5afd135967
1 changed files with 2 additions and 0 deletions

View File

@ -240,6 +240,7 @@ class TermLogRecorder(object):
TermLogRecorder.loglist[str(id)] = [self]
def write(self, msg):
"""
if self.recoder and (not self._in_vim):
if self.commands.__len__() == 0:
self._stream.feed(msg)
@ -256,6 +257,7 @@ class TermLogRecorder(object):
self._screen.reset()
else:
self._command()
"""
try:
self.write_message(msg)
except: