Thanks for sharing.
I tried it but have to uninstall cos it freeze ST when working on lager file (+2MB).
I try to put the diff calculation in a thread and it work fine, but the thread still run forever on large file, so not very useful.
Probably that difflib.SequenceMatcher is way to slow to use it for this kind of task.
This feature must probably be implemented in core to be efficient.
And some other glitch:
-Windows line endings doesn't work well: you have to use the 'U' flag for opening the file to automatically convert line endings:
- Code: Select all
with open(view.file_name(), "rU") as f:
originalText = f.read().decode('utf8')
-It only work for utf-8 file, it will be nice to get the encoding of the view (view.encoding()) and use it to read the file.
I only make quick and dirty change in your source file, so I prefer not showing it
startup, version: 2144 windows x64 channel: dev