# HG changeset patch # User Bram Moolenaar # Date 1590926403 -7200 # Node ID 9f5f64cc9720d3f0bf03f208fedbf8ecf4303145 # Parent 7d5bd5affd11cedf71935b63aba0b2564a8c949f patch 8.2.0857: GTK cell height can be a pixel too much Commit: https://github.com/vim/vim/commit/5cd1cb9ff9d04979ff4cbc36ca8416d83364505d Author: Bram Moolenaar Date: Sun May 31 13:53:04 2020 +0200 patch 8.2.0857: GTK cell height can be a pixel too much Problem: GTK cell height can be a pixel too much. Solution: Subtract 3 instead of 1 when rounding. (closes https://github.com/vim/vim/issues/6168) diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c --- a/src/gui_gtk_x11.c +++ b/src/gui_gtk_x11.c @@ -4711,7 +4711,8 @@ gui_mch_adjust_charheight(void) pango_font_metrics_unref(metrics); - gui.char_height = (ascent + descent + PANGO_SCALE - 1) / PANGO_SCALE + // Round up, but not when the value is very close (e.g. 15.0009). + gui.char_height = (ascent + descent + PANGO_SCALE - 3) / PANGO_SCALE + p_linespace; // LINTED: avoid warning: bitwise operation on signed value gui.char_ascent = PANGO_PIXELS(ascent + p_linespace * PANGO_SCALE / 2); diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -747,6 +747,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 857, +/**/ 856, /**/ 855,