Optimize and cleanup the autobrace plugin.
It needlessly grabbed strings for the full text insertion range, while it only operated on single-character insertions. This patch bails out early if multi-character insertions are done. Especially when opening a large file, this has a big impact, as we'd otherwise copy the full file contents temporarily just to figure out it's not a brace that was inserted... This was found by massif, see e.g. the picture in this blog post: http://milianw.de/blog/heaptrack-a-heap-memory-profiler-for-linux The sharp peak at the highest memory consumption is the autobrace plugin. With this patch, the peak is gone.
Showing with 58 additions and 58 deletions