aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/move.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/move.c')
-rw-r--r--src/nvim/move.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/nvim/move.c b/src/nvim/move.c
index b150f06a95..d05dc5ca41 100644
--- a/src/nvim/move.c
+++ b/src/nvim/move.c
@@ -660,14 +660,14 @@ void validate_cursor_col(void)
col = curwin->w_virtcol;
off = curwin_col_off();
col += off;
- width = W_WIDTH(curwin) - off + curwin_col_off2();
+ width = curwin->w_width - off + curwin_col_off2();
/* long line wrapping, adjust curwin->w_wrow */
if (curwin->w_p_wrap
- && col >= (colnr_T)W_WIDTH(curwin)
+ && col >= (colnr_T)curwin->w_width
&& width > 0)
/* use same formula as what is used in curs_columns() */
- col -= ((col - W_WIDTH(curwin)) / width + 1) * width;
+ col -= ((col - curwin->w_width) / width + 1) * width;
if (col > (int)curwin->w_leftcol)
col -= curwin->w_leftcol;
else
@@ -769,10 +769,10 @@ curs_columns (
*/
curwin->w_wrow = curwin->w_cline_row;
- textwidth = W_WIDTH(curwin) - extra;
+ textwidth = curwin->w_width - extra;
if (textwidth <= 0) {
/* No room for text, put cursor in last char of window. */
- curwin->w_wcol = W_WIDTH(curwin) - 1;
+ curwin->w_wcol = curwin->w_width - 1;
curwin->w_wrow = curwin->w_height - 1;
} else if (curwin->w_p_wrap
&& curwin->w_width != 0
@@ -780,9 +780,9 @@ curs_columns (
width = textwidth + curwin_col_off2();
/* long line wrapping, adjust curwin->w_wrow */
- if (curwin->w_wcol >= W_WIDTH(curwin)) {
+ if (curwin->w_wcol >= curwin->w_width) {
/* this same formula is used in validate_cursor_col() */
- n = (curwin->w_wcol - W_WIDTH(curwin)) / width + 1;
+ n = (curwin->w_wcol - curwin->w_width) / width + 1;
curwin->w_wcol -= n * width;
curwin->w_wrow += n;
@@ -807,7 +807,7 @@ curs_columns (
* extra
*/
off_left = (int)startcol - (int)curwin->w_leftcol - p_siso;
- off_right = (int)endcol - (int)(curwin->w_leftcol + W_WIDTH(curwin)
+ off_right = (int)endcol - (int)(curwin->w_leftcol + curwin->w_width
- p_siso) + 1;
if (off_left < 0 || off_right > 0) {
if (off_left < 0)
@@ -999,7 +999,7 @@ scrolldown (
validate_virtcol();
validate_cheight();
wrow += curwin->w_cline_height - 1 -
- curwin->w_virtcol / W_WIDTH(curwin);
+ curwin->w_virtcol / curwin->w_width;
}
while (wrow >= curwin->w_height && curwin->w_cursor.lnum > 1) {
if (hasFolding(curwin->w_cursor.lnum, &first, NULL)) {
@@ -1156,7 +1156,7 @@ void scrolldown_clamp(void)
validate_cheight();
validate_virtcol();
end_row += curwin->w_cline_height - 1 -
- curwin->w_virtcol / W_WIDTH(curwin);
+ curwin->w_virtcol / curwin->w_width;
}
if (end_row < curwin->w_height - p_so) {
if (can_fill) {
@@ -1198,7 +1198,7 @@ void scrollup_clamp(void)
&& curwin->w_width != 0
) {
validate_virtcol();
- start_row -= curwin->w_virtcol / W_WIDTH(curwin);
+ start_row -= curwin->w_virtcol / curwin->w_width;
}
if (start_row >= p_so) {
if (curwin->w_topfill > 0)