[TxMt] Re: Turn off code folding?

Allan Odgaard mailinglist at textmate.org
Tue Oct 7 16:35:19 UTC 2014


On 7 Oct 2014, at 17:39, Gerd Knops wrote:

> IIRC TextMate does see if a file changed and reloads it, couldn't it 
> figure out that folds no longer match?

When reloading an open file, it shouldn’t cause issues.

> Maybe the stored fold data could be somehow fingerprinted with some 
> file data? Or before re-applying the folding TextMate could check if 
> the stored fold locations match actual fold candidates in the current 
> text?

I added a CRC 32 check when reading the folding data so that if the 
content has changed, the folding data will be ignored.

Not sure this will do anything for you though, as Git normally write new 
files, so it does not inherit the extended attributes from the previous 
content.

Perhaps there are cases where this is not the case, but I tested 
checkout plus stash and in both cases, the extended attributes were lost 
when Git made changes to the content.


More information about the textmate mailing list