To: vim_dev@googlegroups.com Subject: Patch 8.2.0857 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0857 Problem: GTK cell height can be a pixel too much. Solution: Subtract 3 instead of 1 when rounding. (closes #6168) Files: src/gui_gtk_x11.c *** ../vim-8.2.0856/src/gui_gtk_x11.c 2020-05-30 19:52:42.270340843 +0200 --- src/gui_gtk_x11.c 2020-05-31 13:52:45.492253249 +0200 *************** *** 4711,4717 **** pango_font_metrics_unref(metrics); ! gui.char_height = (ascent + descent + PANGO_SCALE - 1) / PANGO_SCALE + p_linespace; // LINTED: avoid warning: bitwise operation on signed value gui.char_ascent = PANGO_PIXELS(ascent + p_linespace * PANGO_SCALE / 2); --- 4711,4718 ---- pango_font_metrics_unref(metrics); ! // 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); *** ../vim-8.2.0856/src/version.c 2020-05-31 13:09:43.894293957 +0200 --- src/version.c 2020-05-31 13:52:12.904389429 +0200 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 857, /**/ -- hundred-and-one symptoms of being an internet addict: 226. You sit down at the computer right after dinner and your spouse says "See you in the morning." /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///