diff options
| author | Daniel Thompson <[email protected]> | 2024-04-24 14:03:36 +0000 |
|---|---|---|
| committer | Daniel Thompson <[email protected]> | 2024-04-26 16:13:30 +0000 |
| commit | db2f9c7dc29114f531df4a425d0867d01e1f1e28 (patch) | |
| tree | 5ca01d3298c81e97288a5c28420523eb095b69d7 /net/unix/af_unix.c | |
| parent | kdb: Use format-strings rather than '\0' injection in kdb_read() (diff) | |
| download | kernel-db2f9c7dc29114f531df4a425d0867d01e1f1e28.tar.gz kernel-db2f9c7dc29114f531df4a425d0867d01e1f1e28.zip | |
kdb: Fix console handling when editing and tab-completing commands
Currently, if the cursor position is not at the end of the command buffer
and the user uses the Tab-complete functions, then the console does not
leave the cursor in the correct position.
For example consider the following buffer with the cursor positioned
at the ^:
md kdb_pro 10
^
Pressing tab should result in:
md kdb_prompt_str 10
^
However this does not happen. Instead the cursor is placed at the end
(after then 10) and further cursor movement redraws incorrectly. The
same problem exists when we double-Tab but in a different part of the
code.
Fix this by sending a carriage return and then redisplaying the text to
the left of the cursor.
Cc: [email protected]
Reviewed-by: Douglas Anderson <[email protected]>
Tested-by: Justin Stitt <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Daniel Thompson <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions
