fixed some bugs in highlighting.
also, handled the "bug" in coqtop where it returns loc_s > loc_e