On Wed, 2020-12-16 at 10:45 +0100, Laurenz Albe wrote: > I consider this a bug fix, but one that shouldn't be backpatched. > Re-executing the previous query if the editor is quit is > annoying at least and dangerous at worst.
I like that this patch also clears the query buffer in the error case. (For example, if I save the file but then decide I want to cancel execution, the only choice is to issue an abortive :cq from Vim. The current master-branch behavior is to just dump me back onto a continuation prompt, and I have to manually \r the buffer. With this patch, I'm returned to an initial prompt with a clear buffer. Very nice.) Some unexpected behavior I saw when testing this patch: occasionally I would perform a bare \e, save the temporary file, and quit, only to find that nothing was executed. What's happening is, I'm saving the file too quickly, and the timestamp check (which has only second precision) is failing! This isn't a problem in practice for the explicit-filename case, because you probably didn't create the file within the last second, but the temporary files are always zero seconds old by definition. I could see this tripping up some people. --Jacob