diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-06-05 20:48:20 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-06-08 17:53:26 +0000 |
| commit | 94b549f93e8cc4372e5ab7dc9c832219f337819c (patch) | |
| tree | 175274bc422fa8c501344128e4aded8888cb9c6a /debug.h | |
| parent | Merge branch 'il-dl-reset-cursor-col' (diff) | |
vt: emit a tab character if all cells between cursor and tab stop are empty
TAB (\t) move the cursor to the next tab stop. That’s it, according to
the specification.
However, many terminal emulators try to keep tabs in the grid, to be
able to e.g. copy them. That is, copying a text chunk containing tabs
should result in tabs being pasted, not spaces.
In order to do that, we need to print a tab character to the grid. To
improve text reflow of tabs, we also print spaces to the subsequent
cells, up until (but not including) the next tab stop.
However, we can only do this if all the cells between the cursor and
the next tab stop are empty, since (obviously), we cannot overwrite
pre-existing characters.
Finally, while some fonts render tabs as spaces (i.e. an empty glyph),
some use a glyph representing “unprintable” characters, or
similar. Thus, we need to exclude cells with tab characters when
rendering.
Diffstat (limited to 'debug.h')
0 files changed, 0 insertions, 0 deletions
