Fzf: Display artifacts in OSX w/ tmux

Created on 3 Apr 2015  路  6Comments  路  Source: junegunn/fzf

Hi,
Using fzf-tmux, I often end up with some "ghost results" in the pane. The screenshot below explains it all: I only have a single result, nonetheless, the 4 row on top of the pane are visible but not accessible (and only match a previous state of the query).

screen shot 2015-04-03 at 16 07 07

In this particular case, I was Ctrl-T'ing.

To be honest, I don't know whether this one is on iTerm2, tmux or fzf.

Some version info:
iTerm2: Build 2.0.0.20141103
tmux: 1.9a
fzf: 0.9.7

question

Most helpful comment

What is your $TERM? It should be either screen or screen-256color on tmux.
See: https://github.com/junegunn/fzf#rendering-issues

Excerpt from: http://tmux.cvs.sourceforge.net/viewvc/tmux/tmux/FAQ

******************************************************************************
* PLEASE NOTE: most display problems are due to incorrect TERM! Before       *
* reporting problems make SURE that TERM settings are correct inside and     *
* outside tmux.                                                              *
*                                                                            *
* Inside tmux TERM must be "screen" or similar (such as "screen-256color").  *
* Don't bother reporting problems where it isn't!                            *
*                                                                            *
* Outside, it must match your terminal: particularly, use "rxvt" for rxvt    *
* and derivatives.                                                           *
******************************************************************************

All 6 comments

What is your $TERM? It should be either screen or screen-256color on tmux.
See: https://github.com/junegunn/fzf#rendering-issues

Excerpt from: http://tmux.cvs.sourceforge.net/viewvc/tmux/tmux/FAQ

******************************************************************************
* PLEASE NOTE: most display problems are due to incorrect TERM! Before       *
* reporting problems make SURE that TERM settings are correct inside and     *
* outside tmux.                                                              *
*                                                                            *
* Inside tmux TERM must be "screen" or similar (such as "screen-256color").  *
* Don't bother reporting problems where it isn't!                            *
*                                                                            *
* Outside, it must match your terminal: particularly, use "rxvt" for rxvt    *
* and derivatives.                                                           *
******************************************************************************
$ echo $TERM
xterm-256color-italic

Here's the contents of the terminfo definition:

# A xterm-256color based TERMINFO that adds the escape sequences for italic.
xterm-256color-italic|xterm with 256 colors and italic,
  sitm=\E[3m, ritm=\E[23m,
  use=xterm-256color,

So it's basically a xterm-256color.

But I'm using +2 as a default option.

Yeah, it's not allowed on tmux. There was a similar inquiry recently. See here:
https://github.com/junegunn/fzf/issues/77#issuecomment-84417580

Fixed $TERM to be screen-256color-italic, as per @alexpearce's blog post (https://alexpearce.me/2014/05/italics-in-iterm2-vim-tmux/)

Works like a charm.

Congrats! :+1:

@xcambar I use a custom term type and have run into this issue with multiple apps. A nice easy fix is to simply setup an alias in your shell to set the term to whatever that program expects... as a one off. This has been working great for me so far:

alias mutt="TERM=screen-256color mutt"
alias tig="TERM=screen-256color tig"
alias fzf="TERM=screen-256color fzf"

I'm using zsh, but should work wherever.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ahmedelgabri picture ahmedelgabri  路  3Comments

olethanh picture olethanh  路  3Comments

sassanh picture sassanh  路  3Comments

firedev picture firedev  路  3Comments

lbeier picture lbeier  路  3Comments