bigH / git-fuzzy

interactive `git` with the help of `fzf`
MIT License
2.3k stars 42 forks source link

Preview diff window is not showing up #42

Closed jetm closed 2 years ago

jetm commented 2 years ago

Thank you for your amazing work.

I have a problem when I run git fuzzy diff or git fuzzy log. The preview diff window is not showing up as it appears in the presentation. delta is installed and exported GF_PREFERRED_PAGER to use it. The rest works fine; just the preview diff window is not showing up.

With debug enabled, this is the output:

$ git fuzzy diff
[DBG] `hub` not found, disabling GitHub support.
[CMD] (internal) $ gf_diff_direct
[CMD] $ fzf --ansi --no-sort --no-info --multi                      --bind "alt-d:deselect-all"     --bind "alt-a:select-all"             --preview-window=right:59%             -m --phony --header-lines=2 --header $'\n  Query above is with these args \'\E[35m-G query\E[m\017\'\n\n' --preview git\ fuzzy\ helper\ diff_direct_preview_content\ \{q\}\ \{\}\  --bind change:reload\(git\ fuzzy\ helper\ diff_direct_menu_content\ \{q\}\ \)
[CMD] (internal) $ gf_helper_diff_direct_menu_content ''

Using:

$ zsh --version
zsh 5.8.0.2-dev (x86_64-pc-linux-gnu)
$ fzf --version
0.27.2 (e086f0b)
$ delta --version
delta 0.8.3
$ export GF_PREFERRED_PAGER="delta --highlight-removed -w __WIDTH__"

Please, let me know if I can provide more information

bigH commented 2 years ago

Do you export FZF_DEFAULT_OPTS?

jetm commented 2 years ago

Oh, yes. I am exporting FZF_DEFAULT_OPTS. If I unset it, it works the diff. Thanks!

Should git fuzzy replace the current FZF_DEFAULT_OPTS with its own settings?

bigH commented 2 years ago

Since this started as a personal utility, I haven't given much thought to this. My overall stance is that I think users should be able to customize all fzf behavior as it makes sense.

I've pushed a change that explicitly sets nohidden to override defaults.

If you pull the latest, you should be able to leave your configuration as needed.

jetm commented 2 years ago

That fixed. Thank you so much!