Fix bug: multiple undo steps created when inserting into a single-line
require block