ivy-posframe icon indicating copy to clipboard operation
ivy-posframe copied to clipboard

ivy-posframe randomly blink

Open stardiviner opened this issue 6 years ago • 16 comments

When I raise up ivy-posframe, it will randomly blink screen. Is there a way to debug it?

stardiviner avatar Jan 27 '19 01:01 stardiviner

黑屏? 贴个图看看

tumashu avatar Jan 27 '19 02:01 tumashu

不是黑屏,就是Emacs闪烁。我录制个视频吧。我试了录制为gif。但是gif里看不出来闪烁。

output-2019-01-27-15 28 12

是整个Emacs窗口闪烁。

stardiviner avatar Jan 27 '19 07:01 stardiviner

I recorded another video not from inside of Emacs with simpledesktoprecord which I previous video use Emacs package gif-screencast. Then I convert video to gif (because GitHub does not support upload video).

Because it's too large. so I try to compress it. I paste a download link here. https://www.iloveimg.com/download/hm37qy2j4gbq912krfwc9ng16bmnAqwbzlxt3qy44c2qdvsw08A1mhcq4l01r456bn6z1AvgA17hrkgykjh5b8A1tqxA2rvs9fArtr3Ahr5hAlz9kxkpAhqch7kscrccc6bm8bgc5dv1fwgxvcAltrvr89r7r0k2d9zn67Ajj6sv84jwt3mq/1-cf

stardiviner avatar Jan 27 '19 07:01 stardiviner

说实话,确实不知道这个是什么原因导致的。。。。。抱歉

tumashu avatar Jan 27 '19 12:01 tumashu

The issue still remained? @stardiviner ?

conao3 avatar Jun 30 '19 20:06 conao3

Yes, still remained.

stardiviner avatar Jul 01 '19 07:07 stardiviner

OK. Sorry about that. I'll see it later.

conao3 avatar Jul 02 '19 00:07 conao3

Could you tell us about your environment? What version your Emacs on what OS? And how to build/download Emacs?

conao3 avatar Jul 02 '19 00:07 conao3

  • Arch Linux OS with latest version kernel:
$ uname -a
Linux dark 5.1.15-arch1-1-ARCH #1 SMP PREEMPT Tue Jun 25 04:49:39 UTC 2019 x86_64 GNU/Linux
`

- compiled from master branch source code Emacs, version: `GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.5) of 2019-02-22`

- tested with latest version `ivy-posframe`.

Thanks for checking out this issue :)

stardiviner avatar Jul 02 '19 00:07 stardiviner

OK. Thanks for your environment information!

conao3 avatar Jul 02 '19 01:07 conao3

升级 emacs 27 后,输入或者滚动的时候 ivy-posframe 会闪,请问知道是什么原因吗?我用的是 homebrew-emacsmacport.

zhenwenc avatar Nov 08 '20 20:11 zhenwenc

我也有类似的问题 好像是每回ivy-posframe--display时都会调用posframe-show导致的。所以只在第一次时调用posframe-show,就不会闪了。 有闪烁问题的可以试试看下面的代码

(defvar ivy-posframe--first-show t)
(defun ivy-posframe-cleanup ()
  "Cleanup ivy's posframe."
  (setq ivy-posframe--first-show t)
  (when (posframe-workable-p)
    (posframe-hide ivy-posframe-buffer)))
(defun ivy-posframe--display (str &optional poshandler)
  "Show STR in ivy's posframe with POSHANDLER."
  (if (not (posframe-workable-p))
      (ivy-display-function-fallback str)
    (with-ivy-window
      (if (not ivy-posframe--first-show)
          (with-current-buffer ivy-posframe-buffer
            (erase-buffer)
            (insert str))
          (setq ivy-posframe--first-show nil)
          (apply #'posframe-show
                 ivy-posframe-buffer
                 :font ivy-posframe-font
                 :string str
                 :position (point)
                 :poshandler poshandler
                 :background-color (face-attribute 'ivy-posframe :background nil t)
                 :foreground-color (face-attribute 'ivy-posframe :foreground nil t)
                 :internal-border-width ivy-posframe-border-width
                 :internal-border-color (face-attribute 'ivy-posframe-border :background nil t)
                 :override-parameters ivy-posframe-parameters
                 (funcall ivy-posframe-size-function)))
      (ivy-posframe--add-prompt 'ignore)))
  (with-current-buffer ivy-posframe-buffer
    (setq-local truncate-lines ivy-truncate-lines)))

kongds avatar Nov 12 '20 03:11 kongds

亲测 @kongds 提供的方法有效。能否merge进代码库? @tumashu

seagle0128 avatar Mar 10 '21 16:03 seagle0128

这个 bug 和 https://github.com/tumashu/ivy-posframe/issues/114 一样吗?

tumashu avatar Sep 22 '21 00:09 tumashu

这个可能 需要 @stardiviner 和 @kongds 确认下?

seagle0128 avatar Sep 22 '21 07:09 seagle0128

目前,我切换到macOS系统了,目前没有这个闪烁问题了。

stardiviner avatar Sep 22 '21 08:09 stardiviner