-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use $kak_command_fifo for more efficient scrolling #14
Comments
It turns out it doesn't actually work - you can |
Hi @Screwtapello, thanks for bringing it up! I actually experimented with this a bit when the feature first came out, then ran into some issues which we had discussed a bit around https://discord.com/channels/717163870724161556/717165513750609991/857003103127470130. I tried it again and at least that specific issue doesn't exist anymore; maybe it was fixed in mawww/kakoune@19e2225. There is still a couple other issues I had encountered though, one of which you noticed:
In my limited recent experimenting 1. seems solvable by manually redrawing with nop %sh{
python3 -c 'import sys, time
fifo = sys.argv[1]
for i in range(50):
with open(fifo, "w") as cf:
cf.write(f"exec jvj<c-l>")
time.sleep(0.1)
' "$kak_command_fifo" # >/dev/null 2>&1 </dev/null &
} Issue 2. is not as critical but it helps us be more responsive to user input, since the user can cancel an in-progress scroll by doing something else. But it can be argued that it is better if something goes wrong since you can Overall I think it might be worth experimenting with to see if we can live with not backgrounding the process, and also see if there are other rough edges in the fifo implementation we might run into. We can then consider pros and cons of either implementation. |
There were a couple of reasons I decided to play with
When I hit the "Kakoune doesn't repaint until the shell block ends" issue, I deleted my experiment in progress, but now that you've pointed out |
Currently, the plugin works by launching a bunch of
kak -p
processes (in the shell fallback) or connecting directly to Kakoune's control socket (in the Python script) to inject a bunch ofvj
andvk
keystrokes. Now that Kakoune asynchronously accepts commands from scripts via$kak_command_fifo
, we should try it out and see if it's more efficient.The text was updated successfully, but these errors were encountered: