Eliminate adjustment_value dance
Terminal::set_scrollback_lines()
has a
/* Hack: force a change in scroll_delta even if the value remains, so that
vte_term_q_adj_val_changed() doesn't shortcut to no-op, see bug 676075. */
scroll_delta = m_screen->scroll_delta;
m_screen->scroll_delta = -1;
queue_adjustment_value_changed(scroll_delta);
[...]
(link: https://bugzilla.gnome.org/show_bug.cgi?id=676075)
Terminal::reset()
has a
/* Hack: force a change in scroll_delta even if the value remains, so that
vte_term_q_adj_val_changed() doesn't shortcut to no-op, see bug 730599. */
m_screen->scroll_delta = -1;
queue_adjustment_value_changed(m_screen->insert_delta);
[...]
(link: https://bugzilla.gnome.org/show_bug.cgi?id=730599)
Instead of this dance of temporarily setting the value to -1, I think it would be nicer to introduce a force
a.k.a. no_shortcut
flag to queue_adjustment_value_changed()
. Alternatively, inline whatever that method would do, apart from not changing the value (i.e. display/ringview invalidation and friends).