diff --git a/scripts/wk/ui/tmux.py b/scripts/wk/ui/tmux.py index d473f81f..4f376111 100644 --- a/scripts/wk/ui/tmux.py +++ b/scripts/wk/ui/tmux.py @@ -26,12 +26,16 @@ def capture_pane(pane_id=None): def clear_pane(pane_id=None): """Clear pane buffer for current or target pane.""" - cmd = ['tmux', 'send-keys', '-R'] + commands = [ + ['tmux', 'send-keys', '-R'], + ['tmux', 'clear-history'], + ] if pane_id: - cmd.extend(['-t', pane_id]) + commands = [[*cmd, '-t', pane_id] for cmd in commands] # Clear pane - run_program(cmd, check=False) + for cmd in commands: + run_program(cmd, check=False) def fix_layout(layout, forced=False):