From 4e8c3c62698cd372f6714331df2c207521860742 Mon Sep 17 00:00:00 2001 From: Brad Anderson Date: Sat, 11 Jul 2026 13:11:14 -0700 Subject: [PATCH] Add keybind to fix missing cursor after SSH timeout in tmux --- config/tmux.conf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/tmux.conf b/config/tmux.conf index bacf2d6..2852de9 100644 --- a/config/tmux.conf +++ b/config/tmux.conf @@ -78,6 +78,12 @@ if-shell "tmux -V | awk '{print $2}' | awk -F. '{if ($1*1000+$2 < 2004) exit 0; bind-key C run-shell "cal $(date +%Y)" bind r source-file ~/.tmux.conf \; display "Reloaded config" +# A pane whose connection died mid-redraw (e.g. an SSH session killed by the +# laptop sleeping) can get stuck with tmux thinking the cursor is hidden, +# since that's tracked from the pane's own output and nothing ever sent the +# matching show-cursor sequence. Re-run it in the active pane to fix it. +bind R send-keys "printf '\\033[?25h'" Enter + # ---------------------------------------------------------------------------- # Powerline (guarded so machines without it don't error on load) # ----------------------------------------------------------------------------