Description: Fix multiple article highlights
Author: Nikos Tsipinakis <nikos@tsipinakis.com>
Origin: upstream, https://github.com/akrennmair/newsbeuter/pull/215
Bug: https://github.com/akrennmair/newsbeuter/issues/166
Last-Update: 2016-03-10

--- newsbeuter-2.9.orig/src/feedlist_formaction.cpp
+++ newsbeuter-2.9/src/feedlist_formaction.cpp
@@ -668,6 +668,7 @@ void feedlist_formaction::set_regexmanag
 	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);
--- newsbeuter-2.9.orig/src/itemlist_formaction.cpp
+++ newsbeuter-2.9/src/itemlist_formaction.cpp
@@ -972,6 +972,7 @@ void itemlist_formaction::set_regexmanag
 	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);
--- newsbeuter-2.9.orig/src/itemview_formaction.cpp
+++ newsbeuter-2.9/src/itemview_formaction.cpp
@@ -565,6 +565,7 @@ void itemview_formaction::set_regexmanag
 	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());
