AutoYADM commit: 2025-05-13 18:17:09
This commit is contained in:
parent
2ca5ef48b0
commit
66a600da48
1 changed files with 6 additions and 3 deletions
|
@ -57,16 +57,19 @@ 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" %{
|
declare-option str base_scrolloff %opt{scrolloff}
|
||||||
|
|
||||||
|
define-command ui-scrolloff-toggle -docstring "toggle scrolloff" %{
|
||||||
evaluate-commands %sh{
|
evaluate-commands %sh{
|
||||||
CUR="$kak_opt_scrolloff"
|
CUR="$kak_opt_scrolloff"
|
||||||
TARG="$1"
|
IFS=,
|
||||||
HOR="$2"
|
read TARG HOR <<<$kak_opt_base_scrolloff
|
||||||
if [ "$CUR" != ${CUR#99} ]; then
|
if [ "$CUR" != ${CUR#99} ]; then
|
||||||
final="$TARG,$HOR"
|
final="$TARG,$HOR"
|
||||||
else
|
else
|
||||||
final="99,$HOR"
|
final="99,$HOR"
|
||||||
fi
|
fi
|
||||||
|
# echo "echo final: $final, targ: $TARG, hor: $HOR"
|
||||||
echo "set-option window scrolloff $final"
|
echo "set-option window scrolloff $final"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue