imprv: search enable/disable, some keys, comments

This commit is contained in:
2025-09-03 17:35:55 +02:00
parent 1883109616
commit b15848887b
2 changed files with 36 additions and 13 deletions

View File

@@ -78,7 +78,7 @@ fzf_handle_load() {
;;
"$VIEW_LIST_ALBUMS") ;;
esac
[ "${DISABLE_SEARCH:-}" ] && printf "+disable-search+change-query(%s)" "${QUERY:-"$FZF_QUERY"}" || printf "+enable-search+change-query(%s)" "${QUERY:-}"
[ "${DISABLE_SEARCH:-}" ] && printf "+disable-search+change-query(%s)+disable-search" "${QUERY:-"$FZF_QUERY"}" || printf "+enable-search+change-query(%s)+enable-search" "${QUERY:-}"
[ "${SHOW_PREVIEW:-}" ] && printf "+show-preview" || printf "+hide-preview"
[ "${ENABLE_CHANGE:-}" ] && printf "+rebind(change)" || printf "+unbind(change)"
__set_prompt "$view" "$mode"
@@ -547,6 +547,7 @@ fzf_handle_key() {
if [ "${VIEW_NEXT:-}" ]; then
[ "$VIEW_NEXT" = "$VIEW_PLAYLIST" ] && MODE_NEXT="$MODE_NORMAL"
state_update "$VIEW_NEXT" "${MODE_NEXT:-"$mode"}" "${VIEW_NEXT_ARGS:-}"
[ "$MODE_NEXT" = "$MODE_INSERT" ] && printf "+enable-search" || printf "+disable-search"
[ "${ACCEPT:-}" ] && printf "+accept" || printf "+reload:%s" "$0 --fzf-reload"
fi
}