patch 8.2.0425: code for modeless selection not sufficiently tested

Problem:    Code for modeless selection not sufficiently tested.
Solution:   Add tests.  Move mouse code functionality to a common script file.
            (Yegappan Lakshmanan, closes #5821)
diff --git a/src/ui.c b/src/ui.c
index 420eb7d..9a323e4 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -1046,7 +1046,7 @@
     else if (is_drag)
     {
 	// Don't try extending a selection if there isn't one.  Happens when
-	// button-down is in the cmdline and them moving mouse upwards.
+	// button-down is in the cmdline and then moving mouse upwards.
 	if (clip_star.state != SELECT_CLEARED)
 	    clip_process_selection(button, mouse_col, mouse_row, repeat);
     }