Merge pull request #148 from kelianchun/dev

no command data
pull/154/head
kelianchun 2016-03-23 12:29:38 +08:00
commit 30607730f2
1 changed files with 5 additions and 5 deletions

View File

@ -367,13 +367,13 @@ class WebTerminalHandler(tornado.websocket.WebSocketHandler):
match = self.term.ps1_pattern.search(self.term.vim_data) match = self.term.ps1_pattern.search(self.term.vim_data)
if match: if match:
self.term.vim_flag = False self.term.vim_flag = False
vim_data = self.term.deal_command(self.term.vim_data)[0:200] data = self.term.deal_command(self.term.data)[0:200]
if len(data) > 0: 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=data).save()
vim_data = self.term.deal_command(self.term.vim_data)[0:200] data = self.term.deal_command(self.term.data)[0:200]
if len(vim_data) > 0: if len(data) > 0:
TtyLog(log=self.log, datetime=datetime.datetime.now(), TtyLog(log=self.log, datetime=datetime.datetime.now(),
cmd=vim_data).save() cmd=data).save()
self.term.vim_data = '' self.term.vim_data = ''
self.term.data = '' self.term.data = ''
self.term.input_mode = False self.term.input_mode = False