Re: [scintilla] Change history implementation
"'Neil Hodgson' via scite-interest" <[email protected]>
| Newsgroups | gmane.editors.scite.general,gmane.comp.lib.scintilla.devel |
|---|---|
| Message-ID | <[email protected]> |
An issue that has appeared with change markers is that SciTE's Revert command leads to the whole document getting a green change mark as revert just reloads each byte of the file. Since its useful to undo to before the revert, this point can't just be set as the start of change history to appear clear. It may be possible to add a 'revert' state to the change history that could appear clear but its not obvious what the semantics of this state would be. Running a diff between the on-disk file and in-memory document and only changing the ranges that differ would be possible and useful as the incoming changes would be visible. That is a bit complex so, for now, I've implemented a simpler version that finds the starting and ending ranges that are the same and replaces the range between them. This results in reasonable results in many circumstances. This is implemented in SciTE and only works for moderate length (1MB) files in 8-bit encodings as it reads the whole file into a temporary buffer and then checks and modifies. A streaming version could be written that would handle larger files. Scintilla could also add an 'Update' API that could minimize change markers. Available fro the Hg repositories and from https://www.scintilla.org/scite.zip Source https://www.scintilla.org/wscite.zip Windows executable (64-bit) Neil -- You received this message because you are subscribed to the Google Groups "scite-interest" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/scite-interest/4FFC1C7B-FA35-418A-90E6-5CC32515EB4D%40me.com.