aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2021-12-16 12:41:43 +0100
committerGitHub <noreply@github.com>2021-12-16 12:41:43 +0100
commita402b5e2d58c53f0343e5b01ddf9caca961f30ab (patch)
treedcbbf911e5a8061bdaaff2e28a93816e73405b92 /src
parent326e74571be43823ded9fa805a3173bdabda6bec (diff)
parentffe3003e02b370936542df7d07bad073733a84b0 (diff)
downloadrneovim-a402b5e2d58c53f0343e5b01ddf9caca961f30ab.tar.gz
rneovim-a402b5e2d58c53f0343e5b01ddf9caca961f30ab.tar.bz2
rneovim-a402b5e2d58c53f0343e5b01ddf9caca961f30ab.zip
Merge pull request #16134 from zeertzjq/screenpos-border
fix(screenpos, float): add top and left border adjustment
Diffstat (limited to 'src')
-rw-r--r--src/nvim/move.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/move.c b/src/nvim/move.c
index 0a672000e4..15ba6645f5 100644
--- a/src/nvim/move.c
+++ b/src/nvim/move.c
@@ -1011,7 +1011,7 @@ void textpos2screenpos(win_T *wp, pos_T *pos, int *rowp, int *scolp, int *ccolp,
col -= wp->w_leftcol;
if (col >= 0 && col < wp->w_width) {
- coloff = col - scol + (local ? 0 : wp->w_wincol) + 1;
+ coloff = col - scol + (local ? 0 : wp->w_wincol + wp->w_border_adj[3]) + 1;
} else {
scol = ccol = ecol = 0;
// character is left or right of the window
@@ -1022,7 +1022,7 @@ void textpos2screenpos(win_T *wp, pos_T *pos, int *rowp, int *scolp, int *ccolp,
}
}
}
- *rowp = (local ? 0 : wp->w_winrow) + row + rowoff;
+ *rowp = (local ? 0 : wp->w_winrow + wp->w_border_adj[0]) + row + rowoff;
*scolp = scol + coloff;
*ccolp = ccol + coloff;
*ecolp = ecol + coloff;