diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-05-02 12:28:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-02 12:28:26 +0800 |
commit | 22170efb474aae0856aec2525b41b65a6a9e49eb (patch) | |
tree | 428b3317e9f23899ccaa02395100320d7e2f365b /src | |
parent | 26cc946226d96bf6b474d850b961e1060346c96f (diff) | |
parent | 088cdf69e3faf5cf6c9ef743379638127e6e7c0b (diff) | |
download | rneovim-22170efb474aae0856aec2525b41b65a6a9e49eb.tar.gz rneovim-22170efb474aae0856aec2525b41b65a6a9e49eb.tar.bz2 rneovim-22170efb474aae0856aec2525b41b65a6a9e49eb.zip |
Merge pull request #23430 from zeertzjq/multigrid-resized
Fix bugs with ext_multigrid resized grid
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/drawline.c | 2 | ||||
-rw-r--r-- | src/nvim/move.c | 8 | ||||
-rw-r--r-- | src/nvim/normal.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/drawline.c b/src/nvim/drawline.c index 9bdf6a8255..9c6b5c3b8c 100644 --- a/src/nvim/drawline.c +++ b/src/nvim/drawline.c @@ -168,7 +168,7 @@ static void margin_columns_win(win_T *wp, int *left_col, int *right_col) return; } - width1 = wp->w_width - cur_col_off; + width1 = wp->w_width_inner - cur_col_off; width2 = width1 + win_col_off2(wp); *left_col = 0; diff --git a/src/nvim/move.c b/src/nvim/move.c index b749d07d15..58f8b1c893 100644 --- a/src/nvim/move.c +++ b/src/nvim/move.c @@ -966,18 +966,18 @@ void textpos2screenpos(win_T *wp, pos_T *pos, int *rowp, int *scolp, int *ccolp, // similar to what is done in validate_cursor_col() colnr_T col = scol; col += off; - int width = wp->w_width - off + win_col_off2(wp); + int width = wp->w_width_inner - off + win_col_off2(wp); // long line wrapping, adjust row - if (wp->w_p_wrap && col >= (colnr_T)wp->w_width && width > 0) { + if (wp->w_p_wrap && col >= (colnr_T)wp->w_width_inner && width > 0) { // use same formula as what is used in curs_columns() - rowoff = visible_row ? ((col - wp->w_width) / width + 1) : 0; + rowoff = visible_row ? ((col - wp->w_width_inner) / width + 1) : 0; col -= rowoff * width; } col -= wp->w_leftcol; - if (col >= 0 && col < wp->w_width && row + rowoff <= wp->w_height) { + if (col >= 0 && col < wp->w_width_inner && row + rowoff <= wp->w_height_inner) { coloff = col - scol + (local ? 0 : wp->w_wincol + wp->w_wincol_off) + 1; row += local ? 0 : wp->w_winrow + wp->w_winrow_off; } else { diff --git a/src/nvim/normal.c b/src/nvim/normal.c index 5a5286905f..88741e1527 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -5349,7 +5349,7 @@ static void nv_g_dollar_cmd(cmdarg_T *cap) colnr_T vcol; getvvcol(curwin, &curwin->w_cursor, NULL, NULL, &vcol); - if (vcol >= curwin->w_leftcol + curwin->w_width - col_off) { + if (vcol >= curwin->w_leftcol + curwin->w_width_inner - col_off) { curwin->w_cursor.col--; } } |