ivy-posframe
ivy-posframe copied to clipboard
ivy-posframe randomly blink
When I raise up ivy-posframe, it will randomly blink screen. Is there a way to debug it?
黑屏? 贴个图看看
不是黑屏,就是Emacs闪烁。我录制个视频吧。我试了录制为gif。但是gif里看不出来闪烁。

是整个Emacs窗口闪烁。
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
说实话,确实不知道这个是什么原因导致的。。。。。抱歉
The issue still remained? @stardiviner ?
Yes, still remained.
OK. Sorry about that. I'll see it later.
Could you tell us about your environment? What version your Emacs on what OS? And how to build/download Emacs?
- 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 :)
OK. Thanks for your environment information!
升级 emacs 27 后,输入或者滚动的时候 ivy-posframe 会闪,请问知道是什么原因吗?我用的是 homebrew-emacsmacport.
我也有类似的问题 好像是每回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 提供的方法有效。能否merge进代码库? @tumashu
这个 bug 和 https://github.com/tumashu/ivy-posframe/issues/114 一样吗?
这个可能 需要 @stardiviner 和 @kongds 确认下?
目前,我切换到macOS系统了,目前没有这个闪烁问题了。