mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-06 07:15:30 -04:00
term: rename CELL_MULT_COL_SPACER -> CELL_SPACER, and change its definition
Instead of using CELL_SPACER for *all* cells that previously used CELL_MULT_COL_SPACER, include the remaining number of spacers following, and including, itself. This is encoded by adding to the CELL_SPACER value. So, a double width character will now store the character itself in the first cell (just like before), and CELL_SPACER+1 in the second cell. A three-cell character would store the character itself, then CELL_SPACER+2, and finally CELL_SPACER+1. In other words, the last spacer is always CELL_SPACER+1. CELL_SPACER+0 is used when padding at the right margin. I.e. when writing e.g. a double width character in the last column, we insert a CELL_SPACER+0 pad character, and then write the double width character in the first column on the next row.
This commit is contained in:
parent
5bec83c406
commit
d9e1aefb91
9 changed files with 34 additions and 34 deletions
|
|
@ -48,7 +48,7 @@ static_assert(sizeof(struct attributes) == 8, "VT attribute struct too large");
|
|||
|
||||
#define CELL_COMB_CHARS_LO 0x40000000ul
|
||||
#define CELL_COMB_CHARS_HI 0x400ffffful
|
||||
#define CELL_MULT_COL_SPACER 0x40100000ul
|
||||
#define CELL_SPACER 0x40100000ul
|
||||
|
||||
struct cell {
|
||||
wchar_t wc;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue