aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/getchar.c
diff options
context:
space:
mode:
authorUtkarsh Maheshwari <utkarshme96@gmail.com>2018-06-06 02:59:11 +0530
committerBjörn Linse <bjorn.linse@gmail.com>2018-12-31 12:44:21 +0100
commit01555de2da79eaf6e569e5e6ee7244dbf5f709e5 (patch)
treec4cf93ea7ff63b6282d6ab596d6a155a43f9596f /src/nvim/getchar.c
parentf102f50ebeca98365b308463c25eb2caffffba51 (diff)
downloadrneovim-01555de2da79eaf6e569e5e6ee7244dbf5f709e5.tar.gz
rneovim-01555de2da79eaf6e569e5e6ee7244dbf5f709e5.tar.bz2
rneovim-01555de2da79eaf6e569e5e6ee7244dbf5f709e5.zip
multigrid: Allow UIs to set grid size different from window size
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r--src/nvim/getchar.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c
index 94702a9a3a..6a2ee12e46 100644
--- a/src/nvim/getchar.c
+++ b/src/nvim/getchar.c
@@ -2120,8 +2120,8 @@ static int vgetorpeek(int advance)
++col;
}
curwin->w_wrow = curwin->w_cline_row
- + curwin->w_wcol / curwin->w_width;
- curwin->w_wcol %= curwin->w_width;
+ + curwin->w_wcol / curwin->w_grid.Columns;
+ curwin->w_wcol %= curwin->w_grid.Columns;
curwin->w_wcol += curwin_col_off();
col = 0; /* no correction needed */
} else {
@@ -2130,7 +2130,7 @@ static int vgetorpeek(int advance)
}
} else if (curwin->w_p_wrap && curwin->w_wrow) {
--curwin->w_wrow;
- curwin->w_wcol = curwin->w_width - 1;
+ curwin->w_wcol = curwin->w_grid.Columns - 1;
col = curwin->w_cursor.col - 1;
}
if (col > 0 && curwin->w_wcol > 0) {