Closed Stebalien closed 3 years ago
There were similar issue #23
I think the redirect-frame-focus
function is the great solution. I'll add it, thanks for the great idea!
@Stebalien Can you provide some receipt to reproduce this? I've tested the following code with the selectrum-mode
enabled:
(completing-read
"foo: "
(letrec ((table
(lazy-completion-table
table
(lambda ()
(call-process "sleep" nil nil nil "3")
(list "bar1" "bar2" "bar3")))))))
All the keys goes to the minibuffer frame.
Yeah, that didn't do it for me either. My reproduction process is:
consult-line
.Unlike with the command above, there's a delay between running consult-line
and actually displaying the mini-frame
. Looking at a profile, it might be due to fontification/display.
- Open a large org mode file with lots of org source blocks.
- Run
consult-line
.
Thanks, I can reproduce it as well. Not sure about the reason of such behavior, maybe some hook in the minibuffer-setup-hook
.
I've added redirect-frame-focus
as you suggested but after make-frame-visible
. Hope this solves your issue.
After appears to work just as well. Thanks!
Sometimes, especially when running an interactive command with slow completion results (flyspell, consult-lines, etc.):
I've found this can bey fixed by calling
(redirect-frame-focus selected-frame mini-frame-frame)
right before(make-frame-visible mini-frame-frame)
inmini-frame--display
. This also doesn't appear to have any unwanted side effects.I'm submitting this as a bug report, not a patch, as: