improve navigation
This commit is contained in:
parent
d745042839
commit
fe2070c300
@ -25,8 +25,7 @@ class command():
|
|||||||
return
|
return
|
||||||
# this leads to problems in vim -> status line change -> no announcement, so we do check the lengh as hack
|
# this leads to problems in vim -> status line change -> no announcement, so we do check the lengh as hack
|
||||||
if self.env['runtime']['screenManager'].isDelta():
|
if self.env['runtime']['screenManager'].isDelta():
|
||||||
if len(self.env['screen']['newDelta']) > 4:
|
return
|
||||||
return
|
|
||||||
|
|
||||||
# is a vertical change?
|
# is a vertical change?
|
||||||
if not self.env['runtime']['cursorManager'].isCursorVerticalMove():
|
if not self.env['runtime']['cursorManager'].isCursorVerticalMove():
|
||||||
|
@ -45,10 +45,10 @@ class command():
|
|||||||
# navigate by word (i.e. CTRL + Arrow left/right)
|
# navigate by word (i.e. CTRL + Arrow left/right)
|
||||||
if abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) > 1:
|
if abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) > 1:
|
||||||
# at the start of a word
|
# at the start of a word
|
||||||
if newContent[self.env['screen']['newCursor']['x']].isspace():
|
if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \
|
||||||
return
|
(self.env['screen']['newCursor']['x'] != x):
|
||||||
if self.env['screen']['newCursor']['x'] != x:
|
return
|
||||||
return
|
|
||||||
# navigate by char (left/ right)
|
# navigate by char (left/ right)
|
||||||
else:
|
else:
|
||||||
# at the end of a word
|
# at the end of a word
|
||||||
|
Loading…
Reference in New Issue
Block a user