Fix incorrect centering when a PUA or symbol glyph is followed by more than one space

This commit is contained in:
Kovid Goyal 2020-07-12 20:16:16 +05:30
parent 48631c4ea6
commit ca998fb4b0
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 3 additions and 1 deletions

View File

@ -41,6 +41,8 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
- Fix ``launch --location=last`` not working (:iss:`2841`)
- Fix incorrect centering when a PUA or symbol glyph is followed by more than one space
0.18.1 [2020-06-23]
--------------------

View File

@ -1168,7 +1168,7 @@ render_line(FONTS_DATA_HANDLE fg_, Line *line, index_type lnum, Cursor *cursor,
unsigned int num_spaces = 0;
while ((line->cpu_cells[i+num_spaces+1].ch == ' ')
&& num_spaces < MAX_NUM_EXTRA_GLYPHS_PUA
&& num_spaces < desired_cells
&& num_spaces + 1 < desired_cells
&& i + num_spaces + 1 < line->xnum) {
num_spaces++;
// We have a private use char followed by space(s), render it as a multi-cell ligature.