detect selection if it contains last measure
Merge pull request #2 from heuchi/heuchi-fixDetectingSelection

detect selection if it contains last measure
fix formatting

I prefer 3 spaces for indenting
skip undefined tpc's

like for grace notes, who's pitch seems inaccessible to the plugin
framework. Avoids '?' being printed