emacs-libvterm icon indicating copy to clipboard operation
emacs-libvterm copied to clipboard

fzf display broken

Open finity84 opened this issue 2 years ago • 6 comments

fzf has been unusable for me under vterm, running it has its display trying to redraw constantly at the bottom of the screen. Using --reverse let's it somewhat display in the middle of the screen, but display is also garbled.

Using m1 mac latest versions of emacs/fzf from brew install, and vterm from Melpa. Tried on bash/zsh, and disabling configs seems to not help the issue. Works fine however on my remote linux machine using the same config.

I'm not sure but it might have used to work before, like a year ago or so.

finity84 avatar Jul 10 '22 04:07 finity84

update I'm also getting this on a Debian 11 install, with apt's fzf, emacs master and latest emacs-libvterm

finity84 avatar Jan 10 '23 06:01 finity84

I'm also having this issue but it only happens sometimes, so I guess that it might have something to do with vterm-timer-delay. I'll see how it goes if I set the delay to nil.

ackerleytng avatar Apr 12 '23 20:04 ackerleytng

Recently I found that it works fine after window resizing, somehow the vterm resize update doesn't trigger properly on startup and it assumes a different width. I don't know how to do that properly so instead I cobbled up snippets below to update on each new vterm process and seems to work well for me.

(defun vterm-new ()
  (interactive)
  (vterm t)
  (sleep-for 0.1)
  (fix-window-size))

(defun fix-window-size ()
  "Change process window size."
  (message "fixing window size")
  (when (derived-mode-p 'comint-mode)
    (let ((process (get-buffer-process (current-buffer))))
      (unless (eq nil process)
        (set-process-window-size process (window-height) (window-width))))))

finity84 avatar Apr 13 '23 02:04 finity84

I'm also having this issue but it only happens sometimes, so I guess that it might have something to do with vterm-timer-delay. I'll see how it goes if I set the delay to nil.

@ackerleytng how did it go?

zzantares avatar Dec 12 '23 05:12 zzantares

Setting vterm-timer-delay to nil seems to have fixed it

ackerleytng avatar Dec 12 '23 05:12 ackerleytng

I found just adding this to my shell init works:

if [[ "$INSIDE_EMACS" = 'vterm' ]]; then
    resize &>/dev/null
fi

tavisrudd avatar Mar 15 '24 18:03 tavisrudd