Bug 6516 - [Patch] Assorted errors in libedit
Summary: [Patch] Assorted errors in libedit
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 2.2.5-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: Brian Somers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1998-05-04 21:20 UTC by meuston
Modified: 1998-06-27 17:16 UTC (History)
0 users

See Also:


Attachments
file.diff (669 bytes, patch)
1998-05-04 21:20 UTC, meuston
no flags Details | Diff
file.diff (507 bytes, patch)
1998-05-04 21:20 UTC, meuston
no flags Details | Diff
file.diff (471 bytes, patch)
1998-05-04 21:20 UTC, meuston
no flags Details | Diff
file.diff (481 bytes, patch)
1998-05-04 21:20 UTC, meuston
no flags Details | Diff
file.diff (489 bytes, patch)
1998-05-04 21:20 UTC, meuston
no flags Details | Diff
file.diff (2.30 KB, patch)
1998-05-04 21:20 UTC, meuston
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description meuston 1998-05-04 21:20:01 UTC
[tagged "Priority==medium" since this was one of the first complaints
 I had when I first installed FreeBSD and "first impressions count"]

Assorted problems with the history edit functions in libedit.  This
affects sh, ftp (and others?).

(All command keys assume the vi- mode of editing).

1) The 'r' command does not reposition the cursor when it is done.
   [ed_insert() needs to return CC_CURSOR since it automatically calls
   vi_command_mode() if MODE_REPLACE_1].

2) The [count] prefix to commands does not work.  [read_getcmd()
   looped while "cmd==0", but ED_ARGUMENT_DIGIT is the first
   (lexographically) command and is assigned a command code of 0.
   read_getcmd() needs to loop while ED_UNASSIGNED].
   [vi_replace_char() and vi_replace_mode() need to return
   CC_ARGHACK instead of CC_NORM since both commands require another
   argument (the character to substitute)].

3) The 'w' and 'b' commands use the emacs(?) definition of a word
   instead of the vi definition of a word.

4) The 'u' command does not work after the 'r' command.  [ed_insert()
   needs to set ...c_undo.action=CHANGE if MODE_REPLACE*].

5) There is no 'U' command (to undo *all* editing on the current line).

There are more bugs in libedit, but these are the (IMO) big ones I have
found (they are the ones that bothered me).

How-To-Repeat: 
(try to) use the vi- style commands above.
Comment 1 Poul-Henning Kamp freebsd_committer freebsd_triage 1998-05-06 10:20:28 UTC
State Changed
From-To: open->suspended

awaiting committer 
Comment 2 Brian Somers freebsd_committer freebsd_triage 1998-06-27 16:14:49 UTC
Responsible Changed
From-To: freebsd-bugs->brian

I'll do this 
Comment 3 Brian Somers freebsd_committer freebsd_triage 1998-06-27 17:15:29 UTC
State Changed
From-To: suspended->closed

Patches applied to -current.  Will MFC in a few days 
if nobody complains.