Fix TextEdit color_region_cache bug
Due to a single error, _is_line_in_region was previously iterating over the color highlighting for the entire document repeatedly for each line in the script.
This is now fixed, which should make the editor much faster with large scripts.
(cherry picked from commit 57306bf0e3c05a889a01f58fed6a8d4425630439)