mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
vi mode completion: use APPEND when e_nlist is 0 (#493)
Attempting to tab-complete the only member of a directory while in vi mode switches to "control" under the following conditions: 1. pwd is outside of the directory 2. No part of the basename has been typed in (e.g., starting with vim TEST/t will autocomplete to vim TEST/test, but starting with vim TEST/ will not). Also, trying to type with "input" or "replace" fails afterwards until a new line has been generated (either with ctrl + c or the j/k keys in control mode). src/cmd/ksh93/edit/vi.c: textmod(): - The strange completion behavior in vi mode for single-member directories appears to be at least partially due to completion failing to use \ or * mode from outside of pwd. Checking for e_nlist directly from vi.c — 0 unless in = mode — allows for entering the else loop at line 2575 to reach APPEND mode. Resolves: https://github.com/ksh93/ksh/issues/485
This commit is contained in:
parent
1a0d75d47c
commit
3be94a7fd4
3 changed files with 6 additions and 1 deletions
4
NEWS
4
NEWS
|
@ -8,6 +8,10 @@ Any uppercase BUG_* names are modernish shell bug IDs.
|
|||
- Fixed a bug introduced on 2022-02-08 where $PPID was incorrect when a script
|
||||
without a #! path was executed.
|
||||
|
||||
- Fixed a completion bug in the vi line editor. It now correctly completes
|
||||
the sole member of a directory when tab is pressed immediately after /.
|
||||
Thanks to K. Eugene Carlson for the report and the fix.
|
||||
|
||||
2022-07-26:
|
||||
|
||||
- Fixed incorrect handling of initial zeros in test/[ and [[ arithmetic
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue