corrected problem when replacing errors in the list

after an error was replaced in the set error routine, it incorrectly
continued and also inserted an error

this routine was cleaned up so that it returns for a changed line when
the error is removed or an error is replaced; and removed some
unnecessary code from the remove error routine
corrected issue when two or more errors are removed

the problem occurred because the ending change index was set to the last
index in the error list, which becomes beyond the end of the error list
when the second error is removed
123412341234123412341234123412341234123412341234123412341234123412341234