mirror of
https://github.com/vim/vim.git
synced 2025-10-03 05:14:07 -04:00
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 #6168)
This commit is contained in:
@@ -4711,7 +4711,8 @@ gui_mch_adjust_charheight(void)
|
|||||||
|
|
||||||
pango_font_metrics_unref(metrics);
|
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;
|
+ p_linespace;
|
||||||
// LINTED: avoid warning: bitwise operation on signed value
|
// LINTED: avoid warning: bitwise operation on signed value
|
||||||
gui.char_ascent = PANGO_PIXELS(ascent + p_linespace * PANGO_SCALE / 2);
|
gui.char_ascent = PANGO_PIXELS(ascent + p_linespace * PANGO_SCALE / 2);
|
||||||
|
@@ -746,6 +746,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
857,
|
||||||
/**/
|
/**/
|
||||||
856,
|
856,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user