diff --git a/.config/zsh/autoload/git/glog b/.config/zsh/autoload/git/glog index e42b97f..123a1b5 100755 --- a/.config/zsh/autoload/git/glog +++ b/.config/zsh/autoload/git/glog @@ -104,13 +104,11 @@ local -a fzf_args=( ) # The preview-window should be placed differently depending on the dimensions of -# the terminal. -# 0.45 seems to be round about the ratio between cols and lines on my system. -# With that I get somewhat decent results with. This probably depends on the -# font and font-size of the terminal and needs to be changed potentially. +# the terminal. It should have at least 152 columns to fit a preview window on +# the right (12 hash, 50 subject, 80 patch, 10 git graph and fzf ui). local -a tty_size tty_size=(${=$(command stty size 2>/dev/null)}) -if (( ! $? )) && (( $tty_size[2] * 0.4 > $tty_size[1] )); then +if (( ! $? )) && (( $tty_size[2] > 152 )); then fzf_args+=(--preview-window=right) else fzf_args+=(--preview-window=down)