mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-04 06:36:24 +00:00
Fix #6750
This commit is contained in:
parent
9c25a183db
commit
8c83284d5e
2 changed files with 4 additions and 4 deletions
|
|
@ -19,8 +19,8 @@ use Unicode characters from the private use area to represent symbols. Often
|
|||
these symbols are wide and should be rendered in two cells. However, since
|
||||
private use area symbols all have their width set to one in the Unicode
|
||||
standard, |kitty| renders them either smaller or truncated. The exception is if
|
||||
these characters are followed by a space or non-breaking space in which case
|
||||
kitty makes use of the extra cell to render them in two cells. This behavior
|
||||
these characters are followed by a space or en-space (U+2002) in which case
|
||||
kitty makes use of the extra cell to render them in two cells. This behavior
|
||||
can be turned off for specific symbols using :opt:`narrow_symbols`.
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -534,7 +534,7 @@ START_ALLOW_CASE_RANGE
|
|||
switch(cpu_cell->ch) {
|
||||
case 0:
|
||||
case ' ':
|
||||
case 0xa0: // nbsp
|
||||
case 0x2002: // en-space
|
||||
case '\t':
|
||||
case IMAGE_PLACEHOLDER_CHAR:
|
||||
return BLANK_FONT;
|
||||
|
|
@ -1326,7 +1326,7 @@ render_line(FONTS_DATA_HANDLE fg_, Line *line, index_type lnum, Cursor *cursor,
|
|||
unsigned int num_spaces = 0;
|
||||
while (
|
||||
i + num_spaces + 1 < line->xnum
|
||||
&& (line->cpu_cells[i+num_spaces+1].ch == ' ' || line->cpu_cells[i+num_spaces+1].ch == 0xa0) // space or nbsp
|
||||
&& (line->cpu_cells[i+num_spaces+1].ch == ' ' || line->cpu_cells[i+num_spaces+1].ch == 0x2002) // space or en-space
|
||||
&& num_spaces < MAX_NUM_EXTRA_GLYPHS_PUA
|
||||
&& num_spaces + 1 < desired_cells
|
||||
) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue