Package: newsbeuter / 2.9-8

06-fix-highlight.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Description: Fix multiple article highlights
Origin: upstream, https://github.com/akrennmair/newsbeuter/pull/215
Bug: https://github.com/akrennmair/newsbeuter/issues/166
Last-Update: 2016-03-10

--- a/src/feedlist_formaction.cpp
+++ b/src/feedlist_formaction.cpp
@@ -668,6 +668,7 @@
 	for (auto attribute : attrs) {
 		attrstr.append(utils::strprintf("@style_%u_normal:%s ", i, attribute.c_str()));
 		attrstr.append(utils::strprintf("@style_%u_focus:%s ", i, attribute.c_str()));
+		i++;
 	}
 	std::string textview = utils::strprintf("{!list[feeds] .expand:vh style_normal[listnormal]: style_focus[listfocus]:fg=yellow,bg=blue,attr=bold pos_name[feedposname]: pos[feedpos]:0 %s richtext:1}", attrstr.c_str());
 	f->modify("feeds", "replace", textview);
--- a/src/itemlist_formaction.cpp
+++ b/src/itemlist_formaction.cpp
@@ -972,6 +972,7 @@
 	for (auto attribute : attrs) {
 		attrstr.append(utils::strprintf("@style_%u_normal:%s ", i, attribute.c_str()));
 		attrstr.append(utils::strprintf("@style_%u_focus:%s ", i, attribute.c_str()));
+		i++;
 	}
 	std::string textview = utils::strprintf("{list[items] .expand:vh style_normal[listnormal]: style_focus[listfocus]:fg=yellow,bg=blue,attr=bold pos_name[itemposname]: pos[itempos]:0 %s richtext:1}", attrstr.c_str());
 	f->modify("items", "replace", textview);
--- a/src/itemview_formaction.cpp
+++ b/src/itemview_formaction.cpp
@@ -565,6 +565,7 @@
 	std::string attrstr;
 	for (auto attribute : attrs) {
 		attrstr.append(utils::strprintf("@style_%u_normal:%s ", i, attribute.c_str()));
+		i++;
 	}
 	attrstr.append("@style_b_normal[color_bold]:attr=bold @style_u_normal[color_underline]:attr=underline ");
 	std::string textview = utils::strprintf("{textview[article] style_normal[article]: style_end[styleend]:fg=blue,attr=bold %s .expand:vh offset[articleoffset]:0 richtext:1}", attrstr.c_str());