Increase the number of chars to "jump" when the cursor goes out of the input
This commit is contained in:
parent
32308646de
commit
e02f93a8ef
1 changed files with 9 additions and 5 deletions
|
@ -1625,11 +1625,15 @@ class Input(Win):
|
||||||
self.view_pos = 0
|
self.view_pos = 0
|
||||||
return
|
return
|
||||||
if self.pos < self.view_pos:
|
if self.pos < self.view_pos:
|
||||||
self.view_pos = self.pos - 6
|
if self.width <= 25:
|
||||||
if self.pos > self.view_pos + self.width:
|
self.view_pos = self.pos - self.width
|
||||||
self.view_pos = self.pos - self.width + 6
|
else:
|
||||||
assert(self.view_pos > 0 and
|
self.view_pos = self.pos - 25
|
||||||
self.pos > self.view_pos and
|
if self.pos >= self.view_pos + self.width - 1:
|
||||||
|
self.view_pos = self.pos - self.width + 12
|
||||||
|
if self.view_pos < 0:
|
||||||
|
self.view_pos = 0
|
||||||
|
assert(self.pos > self.view_pos and
|
||||||
self.pos < self.view_pos + self.width)
|
self.pos < self.view_pos + self.width)
|
||||||
|
|
||||||
def refresh(self):
|
def refresh(self):
|
||||||
|
|
Loading…
Reference in a new issue