aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/cursor.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2018-12-31 17:37:50 +0100
committerGitHub <noreply@github.com>2018-12-31 17:37:50 +0100
commit6427894d891100c0a41f569ecde65bfdce2ea00c (patch)
treec34bef18907b53dc98e0009ff69a799440080384 /src/nvim/cursor.c
parentccbcd390d42d33a15f15c29fab5d6076a6d3ac08 (diff)
parentc72d9ce0a602ba53b99145f64f0d43327a4e3eb3 (diff)
downloadrneovim-6427894d891100c0a41f569ecde65bfdce2ea00c.tar.gz
rneovim-6427894d891100c0a41f569ecde65bfdce2ea00c.tar.bz2
rneovim-6427894d891100c0a41f569ecde65bfdce2ea00c.zip
Merge pull request #8455 from UtkarshMe/grid-split
implement ext_multigrid: draw each window on a separate resizable grid.
Diffstat (limited to 'src/nvim/cursor.c')
-rw-r--r--src/nvim/cursor.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/nvim/cursor.c b/src/nvim/cursor.c
index 0fda941a51..ee1bc6cf31 100644
--- a/src/nvim/cursor.c
+++ b/src/nvim/cursor.c
@@ -120,11 +120,11 @@ static int coladvance2(
--curwin->w_curswant;
}
} else {
- int width = curwin->w_width - win_col_off(curwin);
+ int width = curwin->w_grid.Columns - win_col_off(curwin);
if (finetune
&& curwin->w_p_wrap
- && curwin->w_width != 0
+ && curwin->w_grid.Columns != 0
&& wcol >= (colnr_T)width) {
csize = linetabsize(line);
if (csize > 0)
@@ -223,9 +223,10 @@ static int coladvance2(
} else {
int b = (int)wcol - (int)col;
- /* The difference between wcol and col is used to set coladd. */
- if (b > 0 && b < (MAXCOL - 2 * curwin->w_width))
+ // The difference between wcol and col is used to set coladd.
+ if (b > 0 && b < (MAXCOL - 2 * curwin->w_grid.Columns)) {
pos->coladd = b;
+ }
col += b;
}
@@ -436,7 +437,7 @@ bool leftcol_changed(void)
bool retval = false;
changed_cline_bef_curs();
- lastcol = curwin->w_leftcol + curwin->w_width - curwin_col_off() - 1;
+ lastcol = curwin->w_leftcol + curwin->w_grid.Columns - curwin_col_off() - 1;
validate_virtcol();
/*