Patch 8.1.1587
Problem: Redraw problem when sign icons in the number column.
Solution: Clear and redraw when changing related options. Right aligh the
sign icon in the GUI. (Yegappan Lakshmanan, closes #4578)
Files: src/gui.c, src/option.c
*** ../vim-8.1.1586/src/gui.c 2019-06-19 16:31:18.030746609 +0200
--- src/gui.c 2019-06-24 05:42:09.678246287 +0200
***************
*** 2253,2258 ****
--- 2253,2259 ----
int col = gui.col;
#ifdef FEAT_SIGN_ICONS
int draw_sign = FALSE;
+ int signcol = 0;
char_u extra[18];
# ifdef FEAT_NETBEANS_INTG
int multi_sign = FALSE;
***************
*** 2287,2292 ****
--- 2288,2295 ----
if (len == 1 && col > 0)
--col;
len = (int)STRLEN(s);
+ if (len > 2)
+ signcol = len - 3; // Right align sign icon in the number column
draw_sign = TRUE;
highlight_mask = 0;
}
***************
*** 2612,2618 ****
#ifdef FEAT_SIGN_ICONS
if (draw_sign)
/* Draw the sign on top of the spaces. */
! gui_mch_drawsign(gui.row, col, gui.highlight_mask);
# if defined(FEAT_NETBEANS_INTG) && (defined(FEAT_GUI_X11) \
|| defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN))
if (multi_sign)
--- 2615,2621 ----
#ifdef FEAT_SIGN_ICONS
if (draw_sign)
/* Draw the sign on top of the spaces. */
! gui_mch_drawsign(gui.row, signcol, gui.highlight_mask);
# if defined(FEAT_NETBEANS_INTG) && (defined(FEAT_GUI_X11) \
|| defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN))
if (multi_sign)
*** ../vim-8.1.1586/src/option.c 2019-06-17 21:48:02.215646277 +0200
--- src/option.c 2019-06-24 05:42:09.678246287 +0200
***************
*** 1985,1991 ****
(char_u *)&p_nf, PV_NF,
{(char_u *)"bin,octal,hex", (char_u *)0L}
SCTX_INIT},
! {"number", "nu", P_BOOL|P_VI_DEF|P_RWIN,
(char_u *)VAR_WIN, PV_NU,
{(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
{"numberwidth", "nuw", P_NUM|P_RWIN|P_VIM,
--- 1985,1991 ----
(char_u *)&p_nf, PV_NF,
{(char_u *)"bin,octal,hex", (char_u *)0L}
SCTX_INIT},
! {"number", "nu", P_BOOL|P_VI_DEF|P_RCLR,
(char_u *)VAR_WIN, PV_NU,
{(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
{"numberwidth", "nuw", P_NUM|P_RWIN|P_VIM,
***************
*** 2252,2258 ****
{"regexpengine", "re", P_NUM|P_VI_DEF,
(char_u *)&p_re, PV_NONE,
{(char_u *)0L, (char_u *)0L} SCTX_INIT},
! {"relativenumber", "rnu", P_BOOL|P_VI_DEF|P_RWIN,
(char_u *)VAR_WIN, PV_RNU,
{(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
{"remap", NULL, P_BOOL|P_VI_DEF,
--- 2252,2258 ----
{"regexpengine", "re", P_NUM|P_VI_DEF,
(char_u *)&p_re, PV_NONE,
{(char_u *)0L, (char_u *)0L} SCTX_INIT},
! {"relativenumber", "rnu", P_BOOL|P_VI_DEF|P_RCLR,
(char_u *)VAR_WIN, PV_RNU,
{(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
{"remap", NULL, P_BOOL|P_VI_DEF,
***************
*** 2497,2503 ****
{"sidescrolloff", "siso", P_NUM|P_VI_DEF|P_VIM|P_RBUF,
(char_u *)&p_siso, PV_SISO,
{(char_u *)0L, (char_u *)0L} SCTX_INIT},
! {"signcolumn", "scl", P_STRING|P_ALLOCED|P_VI_DEF|P_RWIN,
#ifdef FEAT_SIGNS
(char_u *)VAR_WIN, PV_SCL,
{(char_u *)"auto", (char_u *)0L}
--- 2497,2503 ----
{"sidescrolloff", "siso", P_NUM|P_VI_DEF|P_VIM|P_RBUF,
(char_u *)&p_siso, PV_SISO,
{(char_u *)0L, (char_u *)0L} SCTX_INIT},
! {"signcolumn", "scl", P_STRING|P_ALLOCED|P_VI_DEF|P_RCLR,
#ifdef FEAT_SIGNS
(char_u *)VAR_WIN, PV_SCL,
{(char_u *)"auto", (char_u *)0L}
*** ../vim-8.1.1586/src/version.c 2019-06-24 05:06:30.705124234 +0200
--- src/version.c 2019-06-24 05:44:29.757754945 +0200
***************
*** 779,780 ****
--- 779,782 ----
{ /* Add new patch number below this line */
+ /**/
+ 1587,
/**/
--
hundred-and-one symptoms of being an internet addict:
265. Your reason for not staying in touch with family is that
they do not have e-mail addresses.
/// Bram Moolenaar -- Br...@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 ///