lib: Factor out a common code path
lib: Factor out a common code path

This was copied 3 times, WTF, with an inexplicable difference in the middle
(omission of the emit_adjustment_changed() call).

thestinger/vte-ng,saitoha/vte-sixel,saitoha/vte-sixel,thestinger/vte-ng,saitoha/vte-sixel,thestinger/vte-ng