vile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vile] Detecting if vile is idle


From: Brendan O'Dea
Subject: Re: [vile] Detecting if vile is idle
Date: Thu, 10 Mar 2016 10:03:52 +1100

On 9 March 2016 at 22:06, Chris Green <address@hidden> wrote:
> On Wed, Mar 09, 2016 at 03:33:41PM +1100, Brendan O'Dea wrote:
>> Sure, just make some trivial change and undo it:
> Doesn't undo back to the start clear the modified flag?  It certainly
> seems to when done manually, which I think is actually rather clever!

I does clear the modified flag, so "exit" in the script above won't
complain about the contents needing to be saved.  There are however
two relevant bits for each buffer: has the buffer been changed since
last write (BFCHG) and has the buffer been recently changed (BFRCHG).
The first is cleared by the "undo", the second is not.  BFRCHG is used
to determine if the autocolor hook should run, and is only cleared
once it has.

Either way, it works.  If I open a file, source the script I posted
earlier, then wait patiently for fiveish minutes, vile exits.

--bod



reply via email to

[Prev in Thread] Current Thread [Next in Thread]