Kakoune display issues

Does anyone ever have issues with how Kakoune displays text? I just started using Kakoune at work, and we have to connect over ETX.

I use <c-u> and <c-d> a lot, and things like this keep happening:

First, take a look at the missing text on (relative) line number 11:

Sometimes something like this will happen, take a look at this relative line numbering:

This doesn’t happen in vim or less but this does happen in nnn though. I’m using gnome-terminal on Red Hat Enterprise Linux 6.

Edit: This is getting ridiculous:
Left side is what I see. Right side is what I see after doing a <c-l>.

To clarify, this only happen when running kak on ETX ? ( which is some sort of VNC )

I never had this issue, but I only launch kak from my own terminal or through ssh, and it works fine

Yeah. It works fine to machines that I can SSH onto, but we have a bunch that we can only access through ETX.

I would advice you to open an issue in github. The forum is more for discussing things but technical problems are better handled there I believe.

The problem is that I’m not sure if this is a Kakoune issue or not. Maybe my terminal emulator is optimizing kak in weird ways? Should I raise it anyways? I did raise a feature request to help fix this issue I’m seeing.

There is a built-in UI branch, try that out and see if that fixes your problems, if it does then you know that it is the Kakoune display issue.

I use that branch for everything now because I found it extremely reliable.

You using tmux by any chance? I had similar visual bugs on an old version of tmux, although under completely different circumstances.

This is almost certainly a mismatch between the terminal emulator you are running and the terminal emulator Kakoune thinks you’re running.

All terminal emulators support basic things like moving the cursor to a particular location on-screen, changing color, and drawing text, and that’s enough to get an app like Kakoune working… but in practice, it’s frustratingly slow. Different terminals support different extensions that can describe screen updates more efficiently (like scrolling a region of the screen, or clearing a region to a particular colour, or run-length compression of the text stream), and Kakoune (at least in the current master branch that uses ncurses) depends on the $TERM environment variable to tell it what specific terminal emulator you’re using, so it can adapt itself to the extensions that terminal provides.

You should also be aware that the problem comes in two halves - your terminal emulator running on your system sets $TERM to some value, but the value is interpreted on the system where the application runs. So the same terminal emulator with the same $TERM value can work beautifully on one system and be broken on another, if those systems have different terminal-definition databases.


I’l look into this. Thanks!

That’s interesting. When I detach from tmux then the visual bug almost disappears entirely. (I can mash Ctrl-U and Ctrl-D to sometimes get to to reproduce, but before it would almost always break.)

This complicates things. It sounds like I can do some trial and error to figure out which $TERM value I should use for different machines I work on though. Thanks!

Is this branch going to be merged to master, is that the plan? Seems like a lot less display issues, I’ll have to try it out.