@mogenslund - might be doing something wrong when running a compiled version of the latest liquid (lein uberjar 1.0.1-SNAPSHOT, downloaded just now). Getting the following error.
the liq.jar on the website works fine (windows 7).
Thank you @bvs It was a bug. I have fixed it now. Please try again.
How do I understand / navigate errors? For example, I called editor/new-buffer
with no arguments and this gave me "Syntax error compiling at (1:1)." and a stacktrace. Is there a way to inspect the error, to know what caused it (ok, in this case I already know, but in more complicated cases)?
thanks @mogenslund. Works now!
@tom.weissmann I get your point! I have made a new commit where I also extract "cause" from the exception, so the output will be like Syntax error compiling at (1:1). clojure.lang.ArityException: Wrong number of args (0) passed to: dk.salza.liq.editor/new-buffer I was not aware of this field. Now I am happy 🙂
Thanks @mogenslund, I will try it out.
@mogenslund last night I tried Liquid on Windows Subsystem for Linux (running Ubuntu) and it seemed to generate extra line feeds messing up the display. Is that a known issue? I can dig more later if you want me to do some debugging. I also need to try to reproduce on the latest version.
Hi @seancorfield I did not know that. I just tried on a Windows machine and I can reproduce it. It seems like the "real" cursor is not hidden and messes up the display. If you resize the window and type C-g to force a redraw, it will work, due to larger margin avoiding the extra linebreaks. But the "real" cursor is still showing, making the UX poor. I also tried with an alternative console like cmder running wsl inside and there I still need to resize. The "real" cursor is hidden though, but colors are not well supported. If I could find a way to hide the real cursor that migth be a solution.
Ah, interesting. Thanks for digging into that!
A little update @seancorfield. The escape sequences for hide cursor and disable line wrap actually works. But they are reset when the window is resized. So the actual problem is a miscalculation of rows and columns in the window (for some reason?!?). A temporary workaround would be to start liquid with parameters like --rows=30 --columns=100 to "hardcode" the size. Modify the numbers to be as large as possible without getting the issue. Maybe the scrollbar is causing the miscalculation. I will have to investigate.
Thank you! Will play with that a bit tonight.
Does redraw also emit those escape sequences?
No, but maybe it should. I will try that. It is not an expensive operation to do when the whole screen is redrawn anyway.