len(vim_data)

pull/139/head
liuzheng712 2016-03-18 23:51:25 +08:00
parent f331b4471f
commit 9efa9e979c
1 changed files with 5 additions and 3 deletions

View File

@ -370,9 +370,11 @@ class WebTerminalHandler(tornado.websocket.WebSocketHandler):
vim_data = self.term.deal_command(self.term.vim_data)[0:200]
if len(data) > 0:
TtyLog(log=self.log, datetime=datetime.datetime.now(), cmd=vim_data).save()
TtyLog(log=self.log, datetime=datetime.datetime.now(),
cmd=self.term.deal_command(self.term.data)[0:200]).save()
else:
vim_data = self.term.deal_command(self.term.vim_data)[0:200]
if len(vim_data) > 0:
TtyLog(log=self.log, datetime=datetime.datetime.now(),
cmd=vim_data).save()
self.term.vim_data = ''
self.term.data = ''
self.term.input_mode = False