# Kakoune display issues

**URL:** <https://discuss.kakoune.com/t/kakoune-display-issues/1445>\
**Category:** Off Topic\
**Created:** [December 22, 2020, 3:55pm UTC](https://discuss.kakoune.com/t/kakoune-display-issues/1445 "2020-12-22T15:55:01Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![todd](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/todd/32/746_2.png) [@todd](https://discuss.kakoune.com/u/todd)\
**Post date:** [December 22, 2020, 3:55pm UTC](https://discuss.kakoune.com/t/kakoune-display-issues/1445/1 "2020-12-22T15:55:01Z")

</div>

Does anyone ever have issues with how Kakoune displays text? I just started using Kakoune at work, and we have to connect over [ETX](https://www.opentext.com/products-and-solutions/products/specialty-technologies/connectivity/opentext-exceed-turbox).

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:  
 ![image](https://discuss.kakoune.com/uploads/default/original/1X/f6ffdb6bbc771588d8a776aedeb39bef83fb7ebc.png)

Sometimes something like this will happen, take a look at this relative line numbering:  
 ![image](https://discuss.kakoune.com/uploads/default/original/1X/72f9d92f3dfaa5007c152ac3bc1c1faf10235dbc.png)

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>`.

 ![image](https://discuss.kakoune.com/uploads/default/original/1X/03dca35d3b1296a16691f7de4634364841a8ec4c.png)

---

<div class="post-metadata">

**Author:** ![scr](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/scr/32/486_2.png) [@scr](https://discuss.kakoune.com/u/scr)\
**Post date:** [December 22, 2020, 5:46pm UTC](https://discuss.kakoune.com/t/kakoune-display-issues/1445/2 "2020-12-22T17:46:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![todd](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/todd/32/746_2.png) [@todd](https://discuss.kakoune.com/u/todd)\
**Post date:** [December 22, 2020, 6:01pm UTC](https://discuss.kakoune.com/t/kakoune-display-issues/1445/3 "2020-12-22T18:01:59Z")

</div>

> [@scr](#):
>
> To clarify, this only happen when running kak on ETX ?

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

---

<div class="post-metadata">

**Author:** ![useredsa](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/useredsa/32/419_2.png) [@useredsa](https://discuss.kakoune.com/u/useredsa)\
**Post date:** [December 22, 2020, 6:24pm UTC](https://discuss.kakoune.com/t/kakoune-display-issues/1445/4 "2020-12-22T18:24:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![todd](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/todd/32/746_2.png) [@todd](https://discuss.kakoune.com/u/todd)\
**Post date:** [December 22, 2020, 6:53pm UTC](https://discuss.kakoune.com/t/kakoune-display-issues/1445/5 "2020-12-22T18:53:00Z")

</div>

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](https://github.com/mawww/kakoune/issues/3977) to help fix this issue I’m seeing.

---

<div class="post-metadata">

**Author:** ![robertmeta](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/robertmeta/32/833_2.png) [@robertmeta](https://discuss.kakoune.com/u/robertmeta)\
**Post date:** [December 22, 2020, 8:15pm UTC](https://discuss.kakoune.com/t/kakoune-display-issues/1445/6 "2020-12-22T20:15:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![prion](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/prion/32/404_2.png) [@prion](https://discuss.kakoune.com/u/prion)\
**Post date:** [December 22, 2020, 8:25pm UTC](https://discuss.kakoune.com/t/kakoune-display-issues/1445/7 "2020-12-22T20:25:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Screwtapello](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/screwtapello/32/12_2.png) [@Screwtapello](https://discuss.kakoune.com/u/Screwtapello)\
**Post date:** [December 23, 2020, 1:56am UTC](https://discuss.kakoune.com/t/kakoune-display-issues/1445/8 "2020-12-23T01:56:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![todd](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/todd/32/746_2.png) [@todd](https://discuss.kakoune.com/u/todd)\
**Post date:** [December 23, 2020, 4:13pm UTC](https://discuss.kakoune.com/t/kakoune-display-issues/1445/9 "2020-12-23T16:13:30Z")

</div>

> [@robertmeta](#):
>
> 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’l look into this. Thanks!

> [@prion](#):
>
> You using tmux by any chance? I had similar visual bugs on an old version of tmux, although under completely different circumstances.

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.)

> [@Screwtapello](#):
>
> 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.

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!

---

<div class="post-metadata">

**Author:** ![craigmac](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/craigmac/32/748_2.png) [@craigmac](https://discuss.kakoune.com/u/craigmac)\
**Post date:** [January 8, 2021, 12:53am UTC](https://discuss.kakoune.com/t/kakoune-display-issues/1445/10 "2021-01-08T00:53:07Z")

</div>

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.
