Commit: patch 9.1.0125: unused init of text_prop_idxs in win_line()

5 views
Skip to first unread message

Christian Brabandt

unread,
Feb 21, 2024, 3:15:11 PM2/21/24
to vim...@googlegroups.com
patch 9.1.0125: unused init of text_prop_idxs in win_line()

Commit: https://github.com/vim/vim/commit/83925be1e68445f7f6a377b7735f93fbc8689003
Author: Dylan Thacker-Smith <dylan.a...@gmail.com>
Date: Wed Feb 21 21:03:10 2024 +0100

patch 9.1.0125: unused init of text_prop_idxs in win_line()

Problem: unused init of text_prop_idxs in win_line
Solution: Remove it, fix typo
(Dylan Thacker-Smith)

Later use of text_prop_idxs treats it as empty, incrementing
text_props_active as new elements are added to this array, so remove
this unused conditional initialization when text_props_active is 0.

closes: #14063

Signed-off-by: Dylan Thacker-Smith <dylan.a...@gmail.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/drawline.c b/src/drawline.c
index 0f3400f9d..3499d39e7 100644
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -1633,16 +1633,6 @@ win_line(
if (text_props[i].tp_id < 0)
last_textprop_text_idx = i;

- // When skipping virtual text the props need to be sorted. The
- // order is reversed!
- if (lnum == wp->w_topline && wp->w_skipcol > 0)
- {
- for (int i = 0; i < text_prop_count; ++i)
- text_prop_idxs[i] = i;
- sort_text_props(wp->w_buffer, text_props,
- text_prop_idxs, text_prop_count);
- }
-
// Text props "above" move the line number down to where the text
// is. Only count the ones that are visible, not those that are
// skipped because of w_skipcol.
@@ -2298,7 +2288,7 @@ win_line(

// If another text prop follows the condition below at
// the last window column must know.
- // If this is an "above" text prop and 'nowrap' the we
+ // If this is an "above" text prop and 'nowrap' then we
// must wrap anyway.
text_prop_above = above;
text_prop_follows |= other_tpi != -1
diff --git a/src/version.c b/src/version.c
index 1893b5f2b..f4b2a1eac 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 125,
/**/
124,
/**/
Reply all
Reply to author
Forward
0 new messages