Yegappan wrote:

> On Fri, Jul 26, 2019 at 1:19 AM StarryLeo <[email protected]> wrote:
> >
> > The same issue as above, because I use the following autocmds to toggle the 
> > relativenumber option:
> >
> > set number relativenumber
> > autocmd InsertEnter * setlocal norelativenumber
> > autocmd InsertLeave * setlocal relativenumber
> >
> > This looks like the version of the last two months has this problem.
> >
> 
> To address screen redraw problems when 'signcolumn' is set, when the 'number'
> or 'relativenumber' options are set or cleared, the screen is
> completely refreshed.
> This logic was introduced in patch 8.1.1587. This logic needs to be optimized 
> to
> take into account the case where the number column is already displayed but
> only the 'relativenumber' option is toggled.

We already draw only then number column when the cursor moves and
'relativenumber' is set.  We could do the same when the value of
'relativenumber' changes, instead of redrawing everything.
Would require a new redraw type, perhaps VALID_RENUMBER.
It would be set when the option value changes, and used in win_update():

            if (wp->w_p_rnu || type == VALID_RENUMBER)

Not 100% sure this works though.

-- 
Westheimer's Discovery:
        A couple of months in the laboratory can
        frequently save a couple of hours in the library.

 /// Bram Moolenaar -- [email protected] -- 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    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/201907271314.x6RDE7bI014729%40masaka.moolenaar.net.

Raspunde prin e-mail lui