add initial working highlight focus tracking
This commit is contained in:
parent
6f479a7561
commit
a58fe62f87
@ -17,6 +17,8 @@ class command():
|
|||||||
return ''
|
return ''
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
|
||||||
|
return
|
||||||
if self.env['screenData']['newTTY'] != self.env['screenData']['oldTTY']:
|
if self.env['screenData']['newTTY'] != self.env['screenData']['oldTTY']:
|
||||||
return
|
return
|
||||||
if self.env['runtime']['inputManager'].noKeyPressed():
|
if self.env['runtime']['inputManager'].noKeyPressed():
|
||||||
|
@ -17,6 +17,8 @@ class command():
|
|||||||
return ''
|
return ''
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
|
||||||
|
return
|
||||||
if self.env['runtime']['inputManager'].noKeyPressed():
|
if self.env['runtime']['inputManager'].noKeyPressed():
|
||||||
return
|
return
|
||||||
if self.env['screenData']['newTTY'] != self.env['screenData']['oldTTY']:
|
if self.env['screenData']['newTTY'] != self.env['screenData']['oldTTY']:
|
||||||
|
@ -29,9 +29,7 @@ class command():
|
|||||||
return
|
return
|
||||||
prevLine = self.env['screenData']['oldContentText'].split('\n')[self.env['screenData']['newCursor']['y']]
|
prevLine = self.env['screenData']['oldContentText'].split('\n')[self.env['screenData']['newCursor']['y']]
|
||||||
currLine = self.env['screenData']['newContentText'].split('\n')[self.env['screenData']['newCursor']['y']]
|
currLine = self.env['screenData']['newContentText'].split('\n')[self.env['screenData']['newCursor']['y']]
|
||||||
if currLine.isspace():
|
if not currLine.isspace():
|
||||||
self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True)
|
|
||||||
else:
|
|
||||||
currPrompt = currLine.find('$')
|
currPrompt = currLine.find('$')
|
||||||
rootPrompt = currLine.find('#')
|
rootPrompt = currLine.find('#')
|
||||||
if currPrompt <= 0:
|
if currPrompt <= 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user