diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-05-14 14:32:06 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-05-14 14:32:06 +0000 |
| commit | 8e05f42a1ccdc882a10e88f85a10cab61605a88b (patch) | |
| tree | 3daec9e505a3c0c926ec56fd21a491ced69b1787 /debug.h | |
| parent | term: rename CELL_MULT_COL_SPACER -> CELL_SPACER, and change its definition (diff) | |
grid: don’t depend on wcwidth()
Calling wcwidth() on every character in the entire scrollback history
is slow.
We already have the character width encoded in the grid; it’s in the
CELL_SPACERs following a multi-column character.
Thus, when we see a non-SPACER character, that isn’t in the last
column, peek the next character. If it’s a SPACER, get the current
characters width from it.
The only thing we need the width for, is to be able to print padding
SPACERS in the right margin, if the there isn’t enough space on the
current row for the current character.
Diffstat (limited to 'debug.h')
0 files changed, 0 insertions, 0 deletions
