[Bug] Extra spacing in scrollback output with tmux navigation

Open 💬 0 comments Opened Jun 17, 2026 by isdg

Bug Description
i use only keyboard and for scrolling cc i use tmux. there is extraspacing (new added lines) in the scroll, can you fix this pb?

Environment Info

  • Platform: darwin
  • Terminal: tmux, ghostty
  • Version: 2.1.170
  • Feedback ID: 9a791e5b-8dcc-4585-9d5b-933a2d3117ae

my tmux config



set -g mouse on
set -g history-limit 100000

# Truecolor passthrough: without this tmux quantizes 24-bit color to its
# 256-palette, shifting vim/bat hex colors (most visible in fzf previews).
set -g default-terminal "tmux-256color"
set -as terminal-features ',*:RGB'

set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on

setw -g mode-keys vi
set -g set-clipboard on
# Advertise OSC 52 clipboard support for every terminal so tmux emits it on
# copy (Ghostty handles it locally and over SSH). Without this tmux won't send
# OSC 52 unless the attached terminal's terminfo declares the Ms capability.
set -as terminal-features ',*:clipboard'

bind & if-shell -F "#{==:#{window_index},1}" \
  "kill-window" \
  "select-window -t :- ; kill-window -t :+"
bind x kill-pane
bind X confirm-before -p "kill session #S? (y/n)" kill-session

bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -a -c "#{pane_current_path}"
bind C command-prompt -p "new session name:" "new-session -s '%%' -c '~'"

bind n previous-window
bind p next-window

# copy-selection (no pipe) + set-clipboard on => tmux emits OSC 52 to the
# outer terminal, so the selection lands in the *local* Mac clipboard whether
# tmux runs locally or on a remote SSH host. No pbcopy/xclip needed.
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send -X copy-selection-no-clear
bind -T copy-mode-vi Enter send -X copy-selection-no-clear
bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-selection-no-clear

# Capture current pane's scrollback into a new window with line numbers.
#   prefix P → less -N    (quick read, q to exit)
#   prefix N → nvim       (full navigation: /, n, marks, etc.)
bind P run-shell 'f=$(mktemp -t tmux-pane.XXXXXX); tmux capture-pane -pe -S - > "$f" && tmux new-window "less -RN +G $f"'
bind N run-shell 'f=$(mktemp -t tmux-pane.XXXXXX); tmux capture-pane -pe -S - > "$f" && tmux new-window "nvim -n -c \"set number nowrap\" -c \"lua pcall(function() require([[baleia]]).setup().once(0) end)\" -c \"normal G\" $f"'

# theme=light
set -g status-style "bg=default,fg=#555555"
set -g window-status-style "bg=default,fg=#777777"
set -g window-status-current-style "bg=default,fg=#000000,bold"
set -g status-left-style "bg=default,fg=#555555"
set -g status-right-style "bg=default,fg=#555555"
set -g message-style "bg=default,fg=#333333"
set -g pane-border-style "fg=#cccccc"
set -g pane-active-border-style "fg=#888888"

# --- plugins (TPM) ---
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'

run '~/.tmux/plugins/tpm/tpm'

Errors

[]

View original on GitHub ↗