add initial working highlight focus tracking

This commit is contained in:
chrys 2016-11-04 22:23:54 +01:00
parent 6f479a7561
commit a58fe62f87
3 changed files with 5 additions and 3 deletions

View File

@ -17,6 +17,8 @@ class command():
return ''
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
return
if self.env['screenData']['newTTY'] != self.env['screenData']['oldTTY']:
return
if self.env['runtime']['inputManager'].noKeyPressed():

View File

@ -17,6 +17,8 @@ class command():
return ''
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
return
if self.env['runtime']['inputManager'].noKeyPressed():
return
if self.env['screenData']['newTTY'] != self.env['screenData']['oldTTY']:

View File

@ -29,9 +29,7 @@ class command():
return
prevLine = self.env['screenData']['oldContentText'].split('\n')[self.env['screenData']['newCursor']['y']]
currLine = self.env['screenData']['newContentText'].split('\n')[self.env['screenData']['newCursor']['y']]
if currLine.isspace():
self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True)
else:
if not currLine.isspace():
currPrompt = currLine.find('$')
rootPrompt = currLine.find('#')
if currPrompt <= 0: