0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 8.0.1136: W_WIDTH() is always the same

Problem:    W_WIDTH() is always the same.
Solution:   Expand the macro.
This commit is contained in:
Bram Moolenaar
2017-09-22 15:20:32 +02:00
parent 53f8174eae
commit 0263146b5d
26 changed files with 142 additions and 142 deletions

View File

@@ -1783,7 +1783,7 @@ edit_putchar(int c, int highlight)
#ifdef FEAT_RIGHTLEFT
if (curwin->w_p_rl)
{
pc_col += W_WIDTH(curwin) - 1 - curwin->w_wcol;
pc_col += curwin->w_width - 1 - curwin->w_wcol;
# ifdef FEAT_MBYTE
if (has_mbyte)
{
@@ -1865,7 +1865,7 @@ display_dollar(colnr_T col)
}
#endif
curs_columns(FALSE); /* recompute w_wrow and w_wcol */
if (curwin->w_wcol < W_WIDTH(curwin))
if (curwin->w_wcol < curwin->w_width)
{
edit_putchar('$', FALSE);
dollar_vcol = curwin->w_virtcol;
@@ -6820,7 +6820,7 @@ check_auto_format(
/*
* Find out textwidth to be used for formatting:
* if 'textwidth' option is set, use it
* else if 'wrapmargin' option is set, use W_WIDTH(curwin) - 'wrapmargin'
* else if 'wrapmargin' option is set, use curwin->w_width - 'wrapmargin'
* if invalid value, use 0.
* Set default to window width (maximum 79) for "gq" operator.
*/
@@ -6835,7 +6835,7 @@ comp_textwidth(
{
/* The width is the window width minus 'wrapmargin' minus all the
* things that add to the margin. */
textwidth = W_WIDTH(curwin) - curbuf->b_p_wm;
textwidth = curwin->w_width - curbuf->b_p_wm;
#ifdef FEAT_CMDWIN
if (cmdwin_type != 0)
textwidth -= 1;
@@ -6854,7 +6854,7 @@ comp_textwidth(
textwidth = 0;
if (ff && textwidth == 0)
{
textwidth = W_WIDTH(curwin) - 1;
textwidth = curwin->w_width - 1;
if (textwidth > 79)
textwidth = 79;
}
@@ -9447,7 +9447,7 @@ ins_mousescroll(int dir)
int val, step = 6;
if (mod_mask & (MOD_MASK_SHIFT | MOD_MASK_CTRL))
step = W_WIDTH(curwin);
step = curwin->w_width;
val = curwin->w_leftcol + (dir == MSCR_RIGHT ? -step : step);
if (val < 0)
val = 0;