Download raw body.
bin/ksh: fix emacs/vi line editor getting wrong terminal width
bin/ksh: fix emacs/vi line editor getting wrong terminal width
bin/ksh: fix emacs/vi line editor getting wrong terminal width
bin/ksh: fix emacs/vi line editor getting wrong terminal width
On Wed, Jan 21, 2026 at 05:59:35PM +0100, Kirill A. Korinsky wrote: > On Tue, 20 Jan 2026 22:16:28 +0100, > Helg <helg-openbsd@gmx.de> wrote: > > > > It works in both emacs and vi mode. > > > > However, in testing this, I've found another bug. > > > > I've never looked too closely at this but here's how I understand > > it should work. There are 3 possibilities when an indicator should > > be displayed because some text is not visible. > > > > "> " There is more text to the right > > "< " There is more text to the left > > "* " There is more text in both directions (vi mode shows + instead) > > > > The "> " does not appear at the right edge of the window but about > > 10 characters from the edge. This sometime results in the > appearing > > in the middle of text. It should be output in the same location as > > < and *. > > > > Interestingly, vi mode always displays the indicator 10 characters > > from the right edge of the window. This is too far indented for my > > taste but, either way, it should be consistent in all cases. > > > > Any chance you can fix this too? > > > > Thanks for reports. > > I had started to dig into it, and it leads to a pandora's box. > > So, here I've attached tow patches: > > 1. fix for terminal width > 2. dances around string length and UTF-8 Ah!, I had not tried your other diff with UTF-8 characters. Now I did and it appeared some garbage at the end before the '<' sign. With your new diffs that issue is gone. > > (2) should be applied on (1). > > I've tested both patched in vi and emacs mode, and it looks works correctly. > > But code of ksh is tricky and I defently need more testing. > > Thus, if it commited, I think that it should be in two stages in some delay > between (1) and (2). > > -- > wbr, Kirill -- Walter
bin/ksh: fix emacs/vi line editor getting wrong terminal width
bin/ksh: fix emacs/vi line editor getting wrong terminal width
bin/ksh: fix emacs/vi line editor getting wrong terminal width
bin/ksh: fix emacs/vi line editor getting wrong terminal width