Search ignores escaping of backslashes

I’ve discovered what I think is a bug in the search package. If the editor contains the text \n (as a string literal, not a newline character), and you attempt to search for it, the search interprets the \n input as an actual newline character despite not having the regexp option set.

I think from a user standpoint, what you see is what you should get. So if I see \n and search for that, it should find it. In this case I have to escape in the search query with \\n in order for it to find the \n in the document. Is this the intended behaviour?

Ah, I needed to set the literal option on the SearchQuery object.

Sorry for the noise. Though I do wonder if literal should be on by default!