[view_curses] always apply utf adjustments in mvwattrline

doh

Fixes #786
This commit is contained in:
Timothy Stack 2020-11-04 10:50:37 -08:00
parent 78d5954fd7
commit 00dcd86f79

View File

@ -385,16 +385,14 @@ void view_curses::mvwattrline(WINDOW *window,
for (const auto &adj : utf_adjustments) { for (const auto &adj : utf_adjustments) {
// If the UTF adjustment is in the viewport, we need to adjust this // If the UTF adjustment is in the viewport, we need to adjust this
// attribute. // attribute.
if (adj.uda_origin >= lr_chars.lr_start && if (adj.uda_origin < iter->sa_range.lr_start) {
adj.uda_origin < iter->sa_range.lr_start) {
attr_range.lr_start += adj.uda_offset; attr_range.lr_start += adj.uda_offset;
} }
} }
if (attr_range.lr_end != -1) { if (attr_range.lr_end != -1) {
for (const auto &adj : utf_adjustments) { for (const auto &adj : utf_adjustments) {
if (adj.uda_origin >= lr_chars.lr_start && if (adj.uda_origin < iter->sa_range.lr_end) {
adj.uda_origin < iter->sa_range.lr_end) {
attr_range.lr_end += adj.uda_offset; attr_range.lr_end += adj.uda_offset;
} }
} }