kyoheiu / felix

tui file manager with vim-like key mapping
https://kyoheiu.dev/felix/
MIT License
691 stars 24 forks source link

Terminal session not restored properly when opening felix in a tmux session #274

Closed 64-bitman closed 5 months ago

64-bitman commented 5 months ago

When felix is closed in a tmux session, the cursor is moved to the top of the visible scrollback (using default felix config, completely stock). Only happens in tmux, in a normal terminal session felix exits fine.

felix-bug

~/.tmux.conf:

set -g default-terminal "tmux-256color"
set -sa terminal-features ",alacritty:RGB"
set -g mouse on
set -g history-limit 10000

# stuff for neovim checkhealth
set -sg escape-time 10
set -g focus-events on

# status bar
bind S set status

# map prefix
unbind C-b
set -g prefix M-a
bind M-a send-prefix

# reload config
bind r source-file ~/.tmux.conf \; display "Reloaded tmux.conf"

# window stuff
bind | split-window -h
bind - split-window -v

bind -n F4 new-window -c '#{pane_current_path}'
bind -n F9 killw
bind q killp

bind h select-pane -L
bind l select-pane -R
bind k select-pane -U
bind j select-pane -D

bind -n F1 previous-window
bind -n F2 next-window

unbind n
unbind p

# sessions
bind n new-session
set -g detach-on-destroy off

# status bar
setw -g window-status-current-style 'fg=black,bg=#149c05 bold italics'
set -g renumber-windows on

set -g status-right '#[bold italics]"#{=30:pane_title}"#[noitalics nobold] | %I:%M %p %D '
set -g status-right-length 85
set -g automatic-rename-format '#{pane_current_command}'
set -g window-status-separator '#[bg=#edb458,bold]|#[nobold]'
set -g window-status-style 'fg=black,bg=#ffd700'

Felix version: 2.12.0-1 from official arch repos Distro: Arch linux x86 Terminal: alacritty 0.13.1 Tmux version: 3.3a

Bug still happens even if I set the bash PS1 variable to an empty string

64-bitman commented 5 months ago

Felix logs show nothing notable

22:20:19 [INFO] ===START===
22:20:21 [INFO] ===FINISH===
kyoheiu commented 5 months ago

@expoodo Thank you for the report.

275 should fix this issue: I'd appreciate if you could take a look at it.

64-bitman commented 5 months ago

@expoodo Thank you for the report. #275 should fix this issue: I'd appreciate if you could take a look at it.

Thank you!, that fixes the bug for me.