To: vim_dev@googlegroups.com Subject: Patch 8.1.1670 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.1670 Problem: Sign column not always properly aligned. Solution: Use "col" only after it was calculated. (Yee Cheng Chin, closes #4649) Files: src/gui.c *** ../vim-8.1.1669/src/gui.c 2019-07-08 21:57:26.291708275 +0200 --- src/gui.c 2019-07-12 19:19:43.747868038 +0200 *************** *** 2253,2259 **** int col = gui.col; #ifdef FEAT_SIGN_ICONS int draw_sign = FALSE; ! int signcol = col; char_u extra[18]; # ifdef FEAT_NETBEANS_INTG int multi_sign = FALSE; --- 2253,2259 ---- int col = gui.col; #ifdef FEAT_SIGN_ICONS int draw_sign = FALSE; ! int signcol; char_u extra[18]; # ifdef FEAT_NETBEANS_INTG int multi_sign = FALSE; *************** *** 2270,2276 **** # ifdef FEAT_NETBEANS_INTG || *s == MULTISIGN_BYTE # endif ! ) { # ifdef FEAT_NETBEANS_INTG if (*s == MULTISIGN_BYTE) --- 2270,2276 ---- # ifdef FEAT_NETBEANS_INTG || *s == MULTISIGN_BYTE # endif ! ) { # ifdef FEAT_NETBEANS_INTG if (*s == MULTISIGN_BYTE) *************** *** 2289,2295 **** --col; len = (int)STRLEN(s); if (len > 2) ! signcol = col + len - 3; // Right align sign icon in the number column draw_sign = TRUE; highlight_mask = 0; } --- 2289,2298 ---- --col; len = (int)STRLEN(s); if (len > 2) ! // right align sign icon in the number column ! signcol = col + len - 3; ! else ! signcol = col; draw_sign = TRUE; highlight_mask = 0; } *** ../vim-8.1.1669/src/version.c 2019-07-12 18:45:36.862862540 +0200 --- src/version.c 2019-07-12 19:21:17.259419415 +0200 *************** *** 779,780 **** --- 779,782 ---- { /* Add new patch number below this line */ + /**/ + 1670, /**/ -- CRONE: Who sent you? ARTHUR: The Knights Who Say Ni! CRONE: Aaaagh! (she looks around in rear) No! We have no shrubberies here. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// 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 ///