[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nano-devel] [PATCH] prevent position history overwrites across multiple
From: |
Brand Huntsman |
Subject: |
[Nano-devel] [PATCH] prevent position history overwrites across multiple instances of nano |
Date: |
Sat, 28 Oct 2017 18:19:42 -0600 |
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.
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've been
using this patch for a week without any issues.
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.
They aren't important to fix but file position history is worthless when
overwritten.
0001-prevent-position-history-overwrites-across-multiple-instances-of-nano.patch
Description: Text Data
- [Nano-devel] [PATCH] prevent position history overwrites across multiple instances of nano,
Brand Huntsman <=