handle scroll regions when inserting or deleting lines