Verified Commit 596f2696 authored by mathieui's avatar mathieui

Fix scrolling inside the input when the text is small enough to fit

(e.g. during a completion, the input might scroll due to the length of
the completed item, and not go back to its original state without this
parent 92265678
......@@ -534,6 +534,11 @@ class Input(Win):
if self.view_pos < 0:
self.view_pos = 0
# text small enough to fit inside the window entirely:
# remove scrolling if present
if poopt.wcswidth(self.text) < self.width:
self.view_pos = 0
assert(self.pos >= self.view_pos and
self.pos <= self.view_pos + max(self.width, 3))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment