Open KURANADO2 opened 2 years ago
Hi @KURANADO2 Your chooser looks very cool! Sorry I don't know how to fix your issue but my general suggestion would be to add some console logging to your module to figure out where it's stalling or failing.
Also, can I ask what you're using for your custom Terminal prompt / git prompt? Looks amazing.
Maybe try wrapping the callback function with a hs.timer.doAfter()
to attempt to avoid any lockups?
@luckman212
Thanks! I will print some log to figure this problem!
Also, my terminal is oh-my-zsh, ZSH_THEME is agnoster
.
After installing oh-my-zsh,modify the ~/.zshrc
file:
ZSH_THEME="agnoster"
plugins=(git)
Maybe you should install Meslo LG M Regular for Powerline fonts to solve the garble problem.
@latenitefilms Sorry, I'm not sure hs.timer.doAfter()
should be added to which callback function.
I tried other language input methods that come with the system, and they all have this problem, but Google Japanese Input Method does not have this problem.
Maybe try something like this:
chooser:queryChangedCallback(function()
hs.timer.doAfter(0.1, function()
local query = chooser:query()
page = 1
request(query)
end)
end)
I used hs.chooser to realize the emoji picture search:
When I use chinese Input Method to input
n
i
h
a
o
(that means chinese 'hello'),I found the Input Method blocked by hs.chooser search box:But that doesn't always happen,Sometimes it works properly:
I don't know how to solve this problem,Can someone give me a hand?
This is my code link:https://github.com/KURANADO2/hammerspoon-kuranado/blob/main/modules/emoji.lua