catch modified lines when moving away from line with up/down

when the document changes, the line number the cursor is on is saved
when the cursor is moved away from the current line (currently with the
  up and down keys only), if there is a saved line number, the text of
  that line is captured for processing (for now just outputs the line)
implemented new edit box reset modified function to reset the modified
  line number and the document's modified flag