Trying to detect cursor in edit window