0
0
mirror of https://github.com/tj/n.git synced 2024-11-21 18:48:57 +01:00

Add support for arrows keys when term in application mode (#668)

This commit is contained in:
John Gee 2021-04-25 10:02:14 +12:00 committed by GitHub
parent 7c603007fa
commit a58da13c66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

3
bin/n
View File

@ -534,7 +534,8 @@ menu_select_cache_versions() {
"$ESCAPE_SEQ")
# Handle ESC sequences followed by other characters, i.e. arrow keys
read -rsn 1 -t 1 tmp
if [[ "$tmp" == "[" ]]; then
# See "[" if terminal in normal mode, and "0" in application mode
if [[ "$tmp" == "[" || "$tmp" == "O" ]]; then
read -rsn 1 -t 1 arrow
case "$arrow" in
"$UP")