mirror of
https://github.com/roosta/tmux-fuzzback.git
synced 2026-09-10 07:36:29 -04:00
Fix top padding issue when in fullscreen program
This commit is contained in:
parent
9f850d143b
commit
39f1d34b74
|
|
@ -88,6 +88,7 @@ goto_line() {
|
|||
local line_number="$1"
|
||||
local direction="$2"
|
||||
local max_jump="$3"
|
||||
local max_lines="$4"
|
||||
correction="0"
|
||||
|
||||
if [ "$direction" -eq "1" ];then
|
||||
|
|
@ -106,7 +107,9 @@ goto_line() {
|
|||
|
||||
# Correct if needed
|
||||
if [ "$correction" -gt "0" ]; then
|
||||
cursor_up "$correction"
|
||||
local scroll_top="$(( max_lines - line_number - 1 ))"
|
||||
cursor_up "$max_lines"
|
||||
cursor_down "$scroll_top"
|
||||
fi
|
||||
|
||||
# Centering
|
||||
|
|
@ -268,7 +271,7 @@ fuzzback() {
|
|||
tmux copy-mode
|
||||
|
||||
# Move to position
|
||||
goto_line "$line_number" "$direction" "$max_jump"
|
||||
goto_line "$line_number" "$direction" "$max_jump" "$max_lines"
|
||||
goto_column "$column"
|
||||
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue