mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-30 11:21:15 -03:00
Make up/down cursor move up or down when in multiline mode, except if already in search mode or at the top/bottom line. Since part of this is done in script-space, this involves adding some functionality to the commandline builtin.
darcs-hash:20070921140549-75c98-ba9e83f5e6fdecae5df8f83dd863794c6af9770c.gz
This commit is contained in:
16
input.c
16
input.c
@@ -134,7 +134,9 @@ static const wchar_t *name_arr[] =
|
||||
L"execute",
|
||||
L"beginning-of-buffer",
|
||||
L"end-of-buffer",
|
||||
L"repaint"
|
||||
L"repaint",
|
||||
L"up-line",
|
||||
L"down-line"
|
||||
}
|
||||
;
|
||||
|
||||
@@ -215,7 +217,9 @@ static const wchar_t code_arr[] =
|
||||
R_EXECUTE,
|
||||
R_BEGINNING_OF_BUFFER,
|
||||
R_END_OF_BUFFER,
|
||||
R_REPAINT
|
||||
R_REPAINT,
|
||||
R_UP_LINE,
|
||||
R_DOWN_LINE
|
||||
}
|
||||
;
|
||||
|
||||
@@ -1242,10 +1246,10 @@ static void add_common_bindings()
|
||||
terminfo sometimes specifies a different sequence than what
|
||||
keypresses actually generate
|
||||
*/
|
||||
add_mapping( name[i], L"\x1b[A", L"Up", L"history-search-backward" );
|
||||
add_mapping( name[i], L"\x1b[B", L"Down", L"history-search-forward" );
|
||||
add_terminfo_mapping( name[i], (key_up), L"Up", L"history-search-backward" );
|
||||
add_terminfo_mapping( name[i], (key_down), L"Down", L"history-search-forward" );
|
||||
add_mapping( name[i], L"\x1b[A", L"Up", L"up-or-search" );
|
||||
add_mapping( name[i], L"\x1b[B", L"Down", L"down-or-search" );
|
||||
add_terminfo_mapping( name[i], (key_up), L"Up", L"up-or-search" );
|
||||
add_terminfo_mapping( name[i], (key_down), L"Down", L"down-or-search" );
|
||||
|
||||
add_mapping( name[i], L"\x1b[C", L"Right", L"forward-char" );
|
||||
add_mapping( name[i], L"\x1b[D", L"Left", L"backward-char" );
|
||||
|
||||
Reference in New Issue
Block a user