simplify patternIndex calculation
Merge branch 'master' of github.com:cambridgehackers/xbsv
updated isActiveLine guard
added 'git diff' for creating a patch when projects are compiled