save/restore anchor position along with dot (current position) when editing documents

 * fixes search-replace commands when function keys are used since they rely on selections
   not being disturbed
 * will also be useful later when there may be other selections