aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIbby <33922797+SleepySwords@users.noreply.github.com>2023-04-01 15:04:49 +1100
committerbfredl <bjorn.linse@gmail.com>2023-05-22 13:49:42 +0200
commit584319cb03df44374e110d0c4b1d9b84c2d24aeb (patch)
treeaed8aeedc5f03d99cd92b9f7db9755db2fc05523
parenta37c99048359c27bbb7e1997c2ec318bb2cba787 (diff)
downloadrneovim-584319cb03df44374e110d0c4b1d9b84c2d24aeb.tar.gz
rneovim-584319cb03df44374e110d0c4b1d9b84c2d24aeb.tar.bz2
rneovim-584319cb03df44374e110d0c4b1d9b84c2d24aeb.zip
vim-patch:9.0.0210: 'list' mode does not work properly with virtual text
Problem: 'list' mode does not work properly with virtual text. Solution: Show the "$" at the right position. (closes vim/vim#10913) https://github.com/vim/vim/commit/c3a483fc3c65f649f9985bb88792a465ea18b0a2#diff-15009492c2b1d0a2629908b4618ad51c99d16746f238a0e6451dfe32355ed32fR1653 This commit only contains the seemingly refactored portion (not entirely sure what it does) Co-authored-by: Bram Moolenaar <Bram@vim.org>
-rw-r--r--src/nvim/drawline.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/nvim/drawline.c b/src/nvim/drawline.c
index ad08fd0e10..9374464a93 100644
--- a/src/nvim/drawline.c
+++ b/src/nvim/drawline.c
@@ -2482,15 +2482,11 @@ int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool nochange,
&& wlv.line_attr == 0
&& wlv.line_attr_lowprio == 0) {
// In virtualedit, visual selections may extend beyond end of line
- if (area_highlighting && virtual_active()
- && wlv.tocol != MAXCOL && wlv.vcol < wlv.tocol) {
- wlv.n_extra = 0;
- } else {
+ if (!(area_highlighting && virtual_active()
+ && wlv.tocol != MAXCOL && wlv.vcol < wlv.tocol)) {
wlv.p_extra = at_end_str;
- wlv.n_extra = 1;
- wlv.c_extra = NUL;
- wlv.c_final = NUL;
}
+ wlv.n_extra = 0;
}
if (wp->w_p_list && wp->w_p_lcs_chars.eol > 0) {
c = wp->w_p_lcs_chars.eol;
@@ -2867,7 +2863,7 @@ int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool nochange,
&& !has_fold
&& (*ptr != NUL
|| lcs_eol_one > 0
- || (wlv.n_extra && (wlv.c_extra != NUL || *wlv.p_extra != NUL)))) {
+ || (wlv.n_extra > 0 && (wlv.c_extra != NUL || *wlv.p_extra != NUL)))) {
c = wp->w_p_lcs_chars.ext;
wlv.char_attr = win_hl_attr(wp, HLF_AT);
mb_c = c;