On Thu, 2021-03-04 at 17:41 +0100, Laurenz Albe wrote: > So if you do your "modify and save the file in less than a second" > trick with the old code, you would end up with the old, unmodified > data in the query buffer.
Sorry, I was unclear in my first post -- I'm not modifying the temporary file. Just saving and quitting with :wq, which is much easier to do in less than a second. > I would say that the old behavior is worse in that case, and > discarding the query buffer is better. For the case where you've modified the buffer, I agree, and I'm not arguing otherwise. > I am not against fixing or improving the behavior, but given the > fact that we can't portably get less than second precision, it > seems impossible. You could backdate the temporary file, so that any save is guaranteed to move the timestamp forward. That should work even if the filesystem has extremely poor precision. --Jacob