johnno1962 / GitDiff

Highlights deltas against git repo in Xcode
MIT License
891 stars 54 forks source link

Commenting out lockFocus that cause crashes. #7

Closed onekiloparsec closed 9 years ago

onekiloparsec commented 9 years ago

I haven't found a solution for it. But commenting out lockFocus at least avoid a systematic crash of some of my projects.

onekiloparsec commented 9 years ago

The stack trace of the crash in Console. screen shot 2014-08-03 at 09 35 16

johnno1962 commented 9 years ago

Thanks for this. I’ve not seen this crash, Seems like drawRect: does the lockFocus anyway so I’ve taken it out.

onekiloparsec commented 9 years ago

Great, thanks. BTW, with a slightly more sophisticated 'Diff' object, we could highlight the individual changed characters (bold when changed, different backgrounds etc...). Had no time yet for it (I am more familiar with pure obj-c regex stuff than c++).

johnno1962 commented 9 years ago

Hi, never underestimate the difficulty of a “simple” diff! I’ve pushed a version using the port of Google “DiffMatchPatch". It works even though it gives stange results at times. Not sure about the aesthetics ;)

onekiloparsec commented 9 years ago

Hi. Interesting stuff, didn't know about that Google lib. Aesthetics can be improved later. :-)