diff --git a/docs/changelog.rst b/docs/changelog.rst index 84df53e8e..c024756db 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -41,6 +41,8 @@ To update |kitty|, :doc:`follow the instructions `. - 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] -------------------- diff --git a/kitty/fonts.c b/kitty/fonts.c index 9af6df8e1..d1a3355d5 100644 --- a/kitty/fonts.c +++ b/kitty/fonts.c @@ -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.