corrects undo redo for line

This fixes #116.