summaryrefslogtreecommitdiffstats
path: root/src/edit.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-09-22 15:20:32 +0200
committerBram Moolenaar <Bram@vim.org>2017-09-22 15:20:32 +0200
commit0263146b5dbbb6c120ce2e7720256503b864425d (patch)
treeb6f18fde8fd4bbc29c322b414ac584106e512d7a /src/edit.c
parent53f8174eaeb93b381cf74c58863f8fe82748a22a (diff)
patch 8.0.1136: W_WIDTH() is always the samev8.0.1136
Problem: W_WIDTH() is always the same. Solution: Expand the macro.
Diffstat (limited to 'src/edit.c')
-rw-r--r--src/edit.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/edit.c b/src/edit.c
index 8486e34aaf..14201a2ec3 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -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;