CVSROOT:        /cvs
Module name:    src
Changes by:     schwa...@cvs.openbsd.org        2025/04/27 11:06:58

Modified files:
        bin/ksh        : vi.c 
        regress/bin/ksh/edit: vi.sh 

Log message:
Simple fix to prevvent the "delete to EOL" (D) command in VI mode
from corrupting the cursor position when the last character
remaining on the line is UTF-8.  Instead of putting the cursor
on the last byte, let the loop after the end of the "select" block
put it at the beginning of the last character.

Tested by Walter Alejandro Iglesias <wai at roquesor dot com>,
and no objection was raised when shown on tech@.

Reply via email to