HomeFreeBSD

libedit: Use correct buffer lengths in vi mode v command.

Description

libedit: Use correct buffer lengths in vi mode v command.

Libedit's vi mode provides a v command to edit the current line in vi(1)
(hard-coded to vi, in fact).

When Unicode/wide character mode was added, this command started truncating
and/or corrupting the edited text.

This commit fixes v if the text fits into the buffer. If the text is longer,
it is truncated.

PR: 203743
Obtained from: NetBSD (originally submitted by me)

Details

Provenance
jillesAuthored on
Parents
rS290064: Regen MD configuration files.
Branches
Unknown
Tags
Unknown