nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] [PATCH] prevent position history overwrites across mult


From: Benno Schulenberg
Subject: Re: [Nano-devel] [PATCH] prevent position history overwrites across multiple instances of nano
Date: Mon, 30 Oct 2017 20:49:56 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0


Op 29-10-2017 om 02:19 schreef Brand Huntsman:
Nano's position, search and execute histories are overwritten by the last closed instance. Open two instances, search in both, change position and then close both. The last closed instance overwrites everything the other instance saved.

Yes, this has been a small nuisance to me for a long time.  Thanks for
the patch.

This patch checks the modification time of filepos_history every time an instance updates a position. If changed, it reloads filepos_history before updating its internal position list and always saves filepos_history after updating a position. The update/reload only happens when closing nano or a buffer, so the overhead of checking and reloading isn't a big deal.

I will use the patch locally for a while, and, when finding no issues,
will push it later.

Fixing the search/execute histories might not be possible since it would
alter the internal history of each instance, and no one would want that to
happen.

Hmm...  I'm not so sure no one would want that.  I think I would like
the search strings of a closed instance to be inserted into the history
of other running instances, in a way as if these running instances had
been started after the closed instance.

But that will take a fair amount of code, so let it be for the moment.

Benno



reply via email to

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