AutoYADM commit: 2025-05-11 14:26:08

This commit is contained in:
Daniel Fichtinger 2025-05-11 14:26:08 -04:00
parent 4c16ef5e0c
commit bc29cf6381

View file

@ -65,30 +65,17 @@ define-command -override ui-wrap-toggle -docstring "toggle wrap" %{
map -docstring "Wrap UI" global ui w ": ui-wrap-toggle<ret>" map -docstring "Wrap UI" global ui w ": ui-wrap-toggle<ret>"
define-command ui-scrolloff-toggle -params 2 -docstring "toggle scrolloff" %{ define-command ui-scrolloff-toggle -params 2 -docstring "toggle scrolloff" %{
echo %sh{ evaluate-commands %sh{
CUR="$kak_opt_scrolloff" CUR="$kak_opt_scrolloff"
echo "$CUR"
TARG="$1" TARG="$1"
# echo "$TARG"
HOR="$2" HOR="$2"
# echo "$HOR" if [ "$CUR" != ${CUR#99} ]; then
if [ "$CUR" = "99,$HOR" ]; then final="$TARG,$HOR"
# echo "$TARG,$HOR"
# echo this runs
else else
# echo "99,$HOR" final="99,$HOR"
done fi
} #%arg{@} echo "set-option window scrolloff $final"
# IFS=, set -- $kak_opt_scrolloff }
# CUR="$1"
# ADD="$2"
# TARG="3"
# if [ "$CUR" = "99" ]; then
# echo "$TARG,$ADD"
# else
# echo "99,$ADD"
# fi
} }
map global ui z ": ui-scrolloff-toggle 1 2<ret>" map global ui z ": ui-scrolloff-toggle 1 2<ret>"