Skip to content

Commit

Permalink
choose: clear and render in same operation
Browse files Browse the repository at this point in the history
/close #231

Co-authored-by: Benjamin Lupton <[email protected]>
  • Loading branch information
molleweide and balupton committed Jun 28, 2024
1 parent 788e0c9 commit 787ad90
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions commands/choose
Original file line number Diff line number Diff line change
Expand Up @@ -1457,7 +1457,7 @@ function choose_() (
else
menu_title=$'\e]0;'"👉 $verb $menu_total of $items_count items 👈"$'\a'
fi
printf '%s' "${menu_title}${menu_header}${page_header}${page_visible}${items_bundled}${page_footer}${menu_hint_render}" >"$tty_target"
printf '\e[H\e[2J%s' "${menu_title}${menu_header}${page_header}${page_visible}${items_bundled}${page_footer}${menu_hint_render}" >"$tty_target"
}
function render_result {
local render="$question_title" index
Expand Down Expand Up @@ -1628,7 +1628,6 @@ function choose_() (
break
else
menu_skip_render='no'
tty_clear
fi
done
tty_finish
Expand Down

0 comments on commit 787ad90

Please sign in to comment.