patch 9.1.0251: Filetype test fails

Problem:  Filetype test fails.
Solution: Move detection by name before detection by extension.
          Improve TextChanged test and remove wrong test and fix
          a typo in a comment (zeertzjq).

closes: #14373

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/edit.c b/src/edit.c
index 2f28562..075b39b 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -847,7 +847,7 @@
 		// ins_redraw() triggers TextChangedI only when no characters
 		// are in the typeahead buffer, so reset curbuf->b_last_changedtick only
 		// if the TextChangedI was not blocked by char_avail() (e.g. using :norm!)
-		// and the TextChangeDI autocommand has been trigered
+		// and the TextChangedI autocommand has been triggered.
 		if (!char_avail() && curbuf->b_last_changedtick_i == CHANGEDTICK(curbuf))
 		    curbuf->b_last_changedtick = CHANGEDTICK(curbuf);
 		return (c == Ctrl_O);