File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
lib/Terminal/Widgets/Input Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -121,18 +121,17 @@ class Terminal::Widgets::Input::Text
121121
122122 my $ refresh = $ . input-field . render(: $ edited );
123123 my $ start = $ . input-field . field-start;
124- my $ pos = $ start
125- + $ . input-field . left-mark-width
124+ my $ pos = $ . input-field . left-mark-width
126125 + $ . input-field . scroll-to-insert-width;
127126
128127 self . clear-frame;
129128 self . draw-framing;
130129
131130 my $ tree = span-tree(: $ color ,
132131 string-span($ . prompt-string , color => $ prompt ),
133- ($ refresh . substr (0 , $ pos - 1 ) if $ pos ),
132+ ($ refresh . substr (0 , $ pos ) ),
134133 string-span($ refresh . substr ($ pos , 1 ), color => $ cursor ),
135- ($ refresh . substr ($ pos + 1 ) if $ pos + $ start < $ w ));
134+ ($ refresh . substr ($ pos + 1 ) if $ pos < $ refresh . chars ));
136135
137136 my @ spans = $ . terminal . locale. render($ tree );
138137 self . draw-line-spans($ x , $ y , $ w , @ spans );
You can’t perform that action at this time.
0 commit comments