Fixes exception in JoshText when deleting lines of code that were
paintaing matching brackets.