bling / fzf.el

A front-end for fzf
GNU General Public License v3.0
364 stars 49 forks source link

FZF appearance corrupted when windowed #26

Closed KholdStare closed 6 years ago

KholdStare commented 7 years ago

I am experiencing the following issue: https://emacs.stackexchange.com/questions/24206/fzf-broken-displaying-in-emacs-terminal

Can this be fixed by calling 'ansi-term instead of 'make-term for the fzf function? Or is there a way to force ansi-term to run fzf?

MichaelMackus commented 7 years ago

Having this same issue myself. @KholdStare did you manage to fix this by setting FZF to fullscreen? If so, how would I do that (new to emacs)?

KholdStare commented 7 years ago

@MichaelMackus No I have not solved it unfortunately. It works when emacd is used in the terminal, but is broken otherwise. If you have more than 100 reputation on the emacs stack exchange, you could start a bounty for the linked question. Maybe someone will solve it?

chlunde commented 7 years ago

@bling Du you know the reason for calling set-window-margins? If I adjust it to 0, it seems to work as expected.

diff --git a/fzf.el b/fzf.el
index c2e0a68..3fdf4a8 100644
--- a/fzf.el
+++ b/fzf.el
@@ -90,7 +90,7 @@
       (make-term "fzf" fzf/executable))
     (switch-to-buffer buf)
     (linum-mode 0)
-    (set-window-margins nil 1)
+    (set-window-margins nil 0)

     ;; disable various settings known to cause artifacts, see #1 for more details
     (setq-local scroll-margin 0)
bling commented 7 years ago

looks like it was first introduced here: https://github.com/bling/fzf.el/commit/022798e6ed0d03fcb896635d7322f0b79f6463ff

bling commented 6 years ago

should be fixed now. please try again.