dajva / rg.el

Emacs search tool based on ripgrep
https://rgel.readthedocs.io
GNU General Public License v3.0
471 stars 38 forks source link

Compilation mode filter hook called on partial lines #95

Closed egorenar closed 4 years ago

egorenar commented 4 years ago

Sometimes, the rg-filter hook is called and the last line is incomplete, the last line of the region passed to the hook ends in the middle of the ANSI escape sequence and this breaks the output. Any idea how to fix it ? Because the current handling of this case just deletes the last incomplete ANSI sequence and this breaks everything that follows.

Untitled

egorenar commented 4 years ago

Another example

image

egorenar commented 4 years ago

And more

image

egorenar commented 4 years ago

And it gets even worse. Sometimes, the number of matches changes after refreshing with g :(

egorenar commented 4 years ago

Sorry, this is my fault, the problem was that i had another function in compilation-filter-hook which also interpreted ansi escape sequences :(

dajva commented 4 years ago

Good that you found the source of the problem.