aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/drawline.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-08-28 05:51:19 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-08-28 06:02:01 +0800
commitc70aa84b2a79e8ac83a930dd5bf473940274cf1c (patch)
treebcb917f927e688aa4ef92d353a21d3a089a6161e /src/nvim/drawline.c
parent128091a256d64db2f983d70a888b379d7e63f131 (diff)
downloadrneovim-c70aa84b2a79e8ac83a930dd5bf473940274cf1c.tar.gz
rneovim-c70aa84b2a79e8ac83a930dd5bf473940274cf1c.tar.bz2
rneovim-c70aa84b2a79e8ac83a930dd5bf473940274cf1c.zip
vim-patch:9.0.1800: Cursor position still wrong with 'showbreak' and virtual text
Problem: Cursor position still wrong with 'showbreak' and virtual text after last character or 'listchars' "eol". Solution: Remove unnecessary w_wcol adjustment in curs_columns(). Also fix first char of virtual text not shown at the start of a screen line. closes: vim/vim#12478 closes: vim/vim#12532 closes: vim/vim#12904 https://github.com/vim/vim/commit/6a3897232aecd3e8b9e8b23955e55c1993e5baec
Diffstat (limited to 'src/nvim/drawline.c')
-rw-r--r--src/nvim/drawline.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/drawline.c b/src/nvim/drawline.c
index 31ca9b16ce..7e92128b65 100644
--- a/src/nvim/drawline.c
+++ b/src/nvim/drawline.c
@@ -868,8 +868,8 @@ static void apply_cursorline_highlight(win_T *wp, winlinevars_T *wlv)
}
}
-// Checks if there is more inline virtual text that need to be drawn
-// and sets has_more_virt_inline_chunks to reflect that.
+/// Checks if there is more inline virtual text that need to be drawn
+/// and sets has_more_virt_inline_chunks to reflect that.
static bool has_more_inline_virt(winlinevars_T *wlv, ptrdiff_t v)
{
DecorState *state = &decor_state;
@@ -3096,8 +3096,8 @@ int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool number_onl
|| wlv.filler_todo > 0
|| (wp->w_p_list && wp->w_p_lcs_chars.eol != NUL
&& wlv.p_extra != at_end_str)
- || (wlv.n_extra != 0
- && (wlv.c_extra != NUL || *wlv.p_extra != NUL)) || wlv.more_virt_inline_chunks)) {
+ || (wlv.n_extra != 0 && (wlv.c_extra != NUL || *wlv.p_extra != NUL))
+ || wlv.more_virt_inline_chunks)) {
bool wrap = wp->w_p_wrap // Wrapping enabled.
&& wlv.filler_todo <= 0 // Not drawing diff filler lines.
&& lcs_eol_one != -1 // Haven't printed the lcs_eol character.