Mercurial > vim
comparison src/charset.c @ 29740:b167c91b5f6b v9.0.0210
patch 9.0.0210: 'list' mode does not work properly with virtual text
Commit: https://github.com/vim/vim/commit/c3a483fc3c65f649f9985bb88792a465ea18b0a2
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Aug 14 19:37:36 2022 +0100
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 https://github.com/vim/vim/issues/10913)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 14 Aug 2022 20:45:03 +0200 |
parents | 0eeab24d3faf |
children | bbe62ea78aac |
comparison
equal
deleted
inserted
replaced
29739:fee763635e6b | 29740:b167c91b5f6b |
---|---|
1184 int right = (tp->tp_flags & TP_FLAG_ALIGN_RIGHT); | 1184 int right = (tp->tp_flags & TP_FLAG_ALIGN_RIGHT); |
1185 int wrap = (tp->tp_flags & TP_FLAG_WRAP); | 1185 int wrap = (tp->tp_flags & TP_FLAG_WRAP); |
1186 int len = (int)STRLEN(p); | 1186 int len = (int)STRLEN(p); |
1187 int n_used = len; | 1187 int n_used = len; |
1188 | 1188 |
1189 // The "$" for 'list' mode will go between the EOL and | |
1190 // the text prop, account for that. | |
1191 if (wp->w_p_list && wp->w_lcs_chars.eol != NUL) | |
1192 ++vcol; | |
1193 | |
1189 // Keep in sync with where textprop_size_after_trunc() | 1194 // Keep in sync with where textprop_size_after_trunc() |
1190 // is called in win_line(). | 1195 // is called in win_line(). |
1191 if (!wrap) | 1196 if (!wrap) |
1192 { | 1197 { |
1193 added = wp->w_width - (vcol + size) % wp->w_width; | 1198 added = wp->w_width - (vcol + size) % wp->w_width; |