added conditional for mouse
restore cursor, view, and folding of a document