How to determine if a post was last edited in the Visual Editor

wp_default_editor(); will tell you the default editor – the last editor used. You can hook into the update/save post action and store this for the current post in the options array or somewhere similar. It’s used in wp-includes/class-wp-editor.php to define the default editor when loading TinyMCE in the post editor.