-
The iteration logic for drawing spaces doesn't take into account the last line in the file, such that the last line always iterates across the entire length of the line, performing expensive GtkTextIter operations, even though it's already progressed past the end of the visible line. This causes problems on files with very long lines as the last line in the file, which is common on e.g., normal UTF-8 that's been incorrectly decoded as UTF-16. The fix here just checks to see whether the forward-to-next-line case actually forwards to a new line.
fe0049a3