fix history for PTY
This commit is contained in:
parent
60f27dd68f
commit
8947c29205
@ -15,7 +15,6 @@ class command():
|
|||||||
pass
|
pass
|
||||||
def getDescription(self):
|
def getDescription(self):
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
if self.env['screen']['newAttribDelta'] != '':
|
if self.env['screen']['newAttribDelta'] != '':
|
||||||
return
|
return
|
||||||
@ -23,8 +22,13 @@ class command():
|
|||||||
return
|
return
|
||||||
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
|
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
|
||||||
return
|
return
|
||||||
|
if self.env['runtime']['inputManager'].getShortcutType() in ['KEY']:
|
||||||
if not (self.env['runtime']['inputManager'].getLastDeepestInput() in [['KEY_UP'],['KEY_DOWN']]):
|
if not (self.env['runtime']['inputManager'].getLastDeepestInput() in [['KEY_UP'],['KEY_DOWN']]):
|
||||||
return
|
return
|
||||||
|
if self.env['runtime']['inputManager'].getShortcutType() in ['BYTE']:
|
||||||
|
if not (self.env['runtime']['byteManager'].getLastByteKey() in [b'^[[A',b'^[[B']):
|
||||||
|
return
|
||||||
|
|
||||||
prevLine = self.env['screen']['oldContentText'].split('\n')[self.env['screen']['newCursor']['y']]
|
prevLine = self.env['screen']['oldContentText'].split('\n')[self.env['screen']['newCursor']['y']]
|
||||||
currLine = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
|
currLine = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
|
||||||
if prevLine == currLine:
|
if prevLine == currLine:
|
||||||
|
@ -65,6 +65,8 @@ class byteManager():
|
|||||||
self.repeat = 1
|
self.repeat = 1
|
||||||
self.lastByteKey = convertedEscapeSequence
|
self.lastByteKey = convertedEscapeSequence
|
||||||
self.lastInputTime = time.time()
|
self.lastInputTime = time.time()
|
||||||
|
def getLastByteKey(self):
|
||||||
|
return self.lastByteKey
|
||||||
def handleControlMode(self, escapeSequence):
|
def handleControlMode(self, escapeSequence):
|
||||||
convertedEscapeSequence = self.unifyEscapeSeq(escapeSequence)
|
convertedEscapeSequence = self.unifyEscapeSeq(escapeSequence)
|
||||||
if convertedEscapeSequence == b'^[R':
|
if convertedEscapeSequence == b'^[R':
|
||||||
|
Loading…
Reference in New Issue
Block a user