From 00dcd86f795366441334df5e0d434865cd68a97a Mon Sep 17 00:00:00 2001 From: Timothy Stack Date: Wed, 4 Nov 2020 10:50:37 -0800 Subject: [PATCH] [view_curses] always apply utf adjustments in mvwattrline doh Fixes #786 --- src/view_curses.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/view_curses.cc b/src/view_curses.cc index 138f63fb..e0ebdbb6 100644 --- a/src/view_curses.cc +++ b/src/view_curses.cc @@ -385,16 +385,14 @@ void view_curses::mvwattrline(WINDOW *window, for (const auto &adj : utf_adjustments) { // If the UTF adjustment is in the viewport, we need to adjust this // attribute. - if (adj.uda_origin >= lr_chars.lr_start && - adj.uda_origin < iter->sa_range.lr_start) { + if (adj.uda_origin < iter->sa_range.lr_start) { attr_range.lr_start += adj.uda_offset; } } if (attr_range.lr_end != -1) { for (const auto &adj : utf_adjustments) { - if (adj.uda_origin >= lr_chars.lr_start && - adj.uda_origin < iter->sa_range.lr_end) { + if (adj.uda_origin < iter->sa_range.lr_end) { attr_range.lr_end += adj.uda_offset; } }