[TxMt] Re: uncrustify plays havoc with syntax colouring

Chris Jenkins chrisjenkins at mac.com
Sun Sep 2 17:39:10 UTC 2012


Alan,

here is the command in question (I've also attached a screenshot of the command setup in the bundle editor):

#!/usr/bin/env bash
[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh"

"/usr/local/bin/uncrustify" -l OC -c "$TM_UNCRUSTIFY_OBJC_CONFIG";

There doesn't seem to be any special pattern, it doesn't always do it and immediately running the command again seems to restore the syntax colouring. Making any further edit to the file also restores the syntax colouring.

I mostly work on Objective-C files, a simple test case would be:

1. open a largish ObjC .m file (say 500+ lines).
2. make an edit, e.g.: unindent a line of code
3. run the command
4. try this a few times

Often I see the code lose its syntax colouring from the point where I made the last edit onwards, sometimes its only the actual line or lines in question. All the affected text goes white, it's as though it has lost its scope although selecting some text in the unhighlighted area and showing the scope reveals a perfectly normal scope list. 

I have seen this behaviour on 3 separate Macs: 2 Mac Pro's and 1 MacBook Pro, running pretty much all of the alphas so far, on Lion 10.7.4.

Hope that helps

Chris



	
On 2 Sep 2012, at 01:16, textmate-request at lists.macromates.com wrote:

> This should not be able to happen.
> 
> Can you send step-by-step about how to reproduce (that is, where to get this command from and how you get it into this unhighlighted state).

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20120902/6cd858fb/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2012-09-02 at 18.29.56.png
Type: image/png
Size: 137252 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20120902/6cd858fb/attachment-0001.png>


More information about the textmate mailing list