warpdotdev / Warp

Warp is a modern, Rust-based terminal with AI built in so you and your team can build great software, faster.
https://warp.dev
Other
21.38k stars 373 forks source link

when i use tmux and then click info on screen, tmux will be destroyed #5038

Closed immotal closed 4 months ago

immotal commented 4 months ago

Dupe Check

Describe the bug

When I open a new window and then start a tmux session using the tmux command, every time I try to copy a line of text by selecting it, the tmux window gets destroyed the moment I select the text, and then I can't do anything.

To reproduce

  1. open warp
  2. input tmux
  3. ls
  4. select some text
  5. you will find tmux is destroyed

Expected behavior

No response

Screenshots

2024-06-18 at 16 30

Operating system

MacOS

Operating system and version

14.0 (23A344)

Shell Version

zsh 5.9 (arm-apple-darwin21.3.0)

Current Warp version

v0.2024.06.11.08.02.stable_03

Regression

Yes, this bug started recently or with an X Warp version

Recent working Warp date

No response

Additional context

No response

Does this block you from using Warp daily?

Yes, this issue prevents me from using Warp daily.

Is this a Warp specific issue? (i.e. does it happen in Terminal, iTerm, Kitty, etc.)

Yes, this I confirmed this only happens in Warp, not other terminals.

Warp Internal (ignore): linear-label:b9d78064-c89e-4973-b153-5178a31ee54e

None

acarl005 commented 4 months ago

Hi @immotal thanks for reporting. I'm having trouble reproducing. Do you have a tmux config file? If so, does this still happen if you run tmux without it? tmux -f /dev/null

immotal commented 4 months ago

when i use default tmux config, all is ok, thanks for your answer, this is my tmux config, maybe the specific config caused this problem

#set -g default-terminal "xterm-256color"    # Use 256 colors
set -g default-terminal "screen-256color"    # Use 256 colors
# fix utf character confused with mosh + tmux
# see issue: https://github.com/tmux/tmux/issues/1310
set -as terminal-overrides ',*:indn@'
set -g display-time 5000
# tmux 2.2 has remove below option
# set -g status-utf8 on                       # Enable utf-8
set -g history-limit 100000                 # Scrollback buffer n lines
 set -g mouse on                             # Enable mouse (>=2.1)
setw -g mode-keys vi
set-option -g status-position top           # Status bar, default bottom

set-option -g allow-rename off

# Start window indexing at one instead of zero
set -g base-index 1

# Start pane indexing at one instead of zero
setw -g pane-base-index 1

# Disable default 500ms repeat time
set-option -g repeat-time 0

# Set the prefix key and some key bindings to match GNU Screen
set -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix

# start selecting text typing 'v' key (once you are in copy mode)
bind-key -T copy-mode-vi 'v' send -X begin-selection
# copy selected text to the system's clipboard
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"

# Key bindings for horizontal and vertical panes
unbind %
bind | split-window -h
unbind '"'
bind - split-window -v

# Key bindings for join/split panes
# via: http://unix.stackexchange.com/questions/14300/moving-tmux-window-to-pane
bind-key j command-prompt -p "join pane from:"  "join-pane -s '%%'"
bind-key s command-prompt -p "send pane to:"  "join-pane -t '%%'"

# Shift-movement keys will resize panes
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5

# Window title string (uses statusbar variables)
set -g set-titles-string '#T'
# Disable auto rename window title
set -g allow-rename off
setw -g automatic-rename off

# Bind to reload config
bind r source-file ~/.tmux.conf

# Bind to create a specify layout in current window
bind T source-file ~/.dotfiles/fupeng

# # Pane settings
# set -g status-left-length 90
# set -g status-right-length 90
# set -g status-left '[#(whoami)]'
# set -g status-right '#[fg=white][#(date +" %m-%d %H:%M ")]'
# set -g status-justify "centre"
# set -g window-status-format '#I #W'
# set -g window-status-current-format ' #I #W '
# 
# # https://github.com/seebi/tmux-colors-solarized
set -g status-bg black
set -g status-fg white
# #### COLOUR (Solarized 256)
# 
# # default statusbar colors
#set-option -g status-bg blue
#set-option -g status-fg white
#set-option -g status-attr default
# 
# # default window title colors
#set-window-option -g window-status-fg colour253
#set-window-option -g window-status-bg blue
#set-window-option -g window-status-attr dim
# 
# # active window title colors
#set-window-option -g window-status-current-fg white
#set-window-option -g window-status-current-bg cyan
#set-window-option -g window-status-current-attr bright
# 
# # pane border
# set-option -g pane-border-fg green
# set-option -g pane-border-bg black
# set-option -g pane-active-border-fg red
# set-option -g pane-active-border-bg black
# 
# # message text
# set-option -g message-bg white
# set-option -g message-fg black
# set-option -g message-attr bright
# 
# # pane number display
# set-option -g display-panes-active-colour colour33 #blue
# set-option -g display-panes-colour colour166 #orange

## Status bar design
## from: http://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/
# status line
set -g status-justify centre
set -g status-bg default
set -g status-fg colour12
set -g status-interval 2

# messaging
set -g message-style fg=black,bg=yellow
set -g message-command-style fg=blue,bg=yellow

#window mode
setw -g mode-style bg=colour6,fg=colour0

# window status
setw -g window-status-format " #F#I:#W#F "
setw -g window-status-current-format " #F#I:#W#F "
setw -g window-status-format "#[fg=magenta]#[bg=black] #I #[bg=cyan]#[fg=colour8] #W "
setw -g window-status-current-format "#[bg=brightmagenta]#[fg=colour8] #I #[fg=colour8]#[bg=colour14] #W "
setw -g window-status-current-style bg=colour0,fg=colour11,dim
setw -g window-status-style bg=green,fg=black,reverse

# loud or quiet?
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-window-option -g monitor-activity off
set-option -g bell-action none

# set -g default-terminal "screen-256color"
set -g default-terminal screen-256color

# The modes
setw -g clock-mode-colour colour135
setw -g mode-style bg=colour238,fg=colour196,bold

# The panes
set -g pane-border-style bg=colour235,fg=colour238
set -g pane-active-border-style bg=colour236,fg=colour251

# The statusbar
set -g status-position bottom
set -g status-bg colour034
set -g status-fg colour137
set -g status-style dim
set -g status-left '#[fg=colour233,bg=colour241,bold] @#(whoami) #[fg=colour233,bg=colour245,bold] [#h] '
set -g status-right '#{?pane_synchronized, #[fg=white]#[bg=blue] sync ,}#[fg=colour233,bg=colour241,bold] %Y-%m-%d #[fg=colour233,bg=colour245,bold] %H:%M '
set -g status-right-length 50
set -g status-left-length 50

setw -g window-status-current-style bg=colour238,fg=colour81,bold
setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=red]#F '

setw -g window-status-style bg=colour235,fg=colour138,none
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '

setw -g window-status-bell-style bg=colour1,fg=colour255,bold

set -g mode-style bg=red,fg=green,blink

# The messages 
set -g message-style bg=colour166,fg=colour232,bold
immotal commented 4 months ago

I will use default config tmux later ~

acarl005 commented 4 months ago

Thanks for the config. I'll play around with this and see if I can find the line that caused the issue

immotal commented 3 months ago

when i use iterm2 all is OK ( use tmux and default conf), but in warp when i scroll up the tmux screen, it will show the terminal history