Something of note, this function currently limits itself to scanning the first 1000 lines of a file, which can result in false negatives from the warning message added by your patch.
Yeah that'that's a problem. What do you propose? Scan everything? Might be prohibitively slow. Probably would be sufficiently cheap to global search for EOL+tab and EOL+space for mixed detection and retain the other logic for type/length detection. I will try that.
Another idea would be to just notify if changing from the users preferred indentation choice, but that's not quite as informative as being told that there are mixed indents.
Does the auto EOL feature have this problem?
Btw, does anyone know what the editor setting "TAB Indents" does?