1
0
forked from aniani/vim

updated for version 7.3.1115

Problem:    Many users don't like the cursor line number when 'relativenumber'
            is set.
Solution:   Have four combinations with 'number' and 'relativenumber'.
            (Christian Brabandt)
This commit is contained in:
Bram Moolenaar
2013-06-04 22:13:50 +02:00
parent b76591ef4a
commit 5ebc09b450
5 changed files with 25 additions and 42 deletions

View File

@@ -7647,35 +7647,6 @@ set_bool_option(opt_idx, varp, value, opt_flags)
}
#endif
/* If 'number' is set, reset 'relativenumber'. */
/* If 'relativenumber' is set, reset 'number'. */
else if ((int *)varp == &curwin->w_p_nu && curwin->w_p_nu)
{
curwin->w_p_rnu = FALSE;
/* Only reset the global value if the own value is set globally. */
if (((opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0))
curwin->w_allbuf_opt.wo_rnu = FALSE;
}
else if ((int *)varp == &curwin->w_p_rnu && curwin->w_p_rnu)
{
curwin->w_p_nu = FALSE;
/* Only reset the global value if the own value is set globally. */
if (((opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0))
curwin->w_allbuf_opt.wo_nu = FALSE;
}
else if ((int *)varp == &curwin->w_allbuf_opt.wo_nu
&& curwin->w_allbuf_opt.wo_nu)
{
curwin->w_allbuf_opt.wo_rnu = FALSE;
}
else if ((int *)varp == &curwin->w_allbuf_opt.wo_rnu
&& curwin->w_allbuf_opt.wo_rnu)
{
curwin->w_allbuf_opt.wo_nu = FALSE;
}
else if ((int *)varp == &curbuf->b_p_ro)
{
/* when 'readonly' is reset globally, also reset readonlymode */