[Top][All Lists]

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

Re: [Nano-devel] [PATCH] bug #34898: [Request] reuse existing buffers wh

From: Benno Schulenberg
Subject: Re: [Nano-devel] [PATCH] bug #34898: [Request] reuse existing buffers when adding files
Date: Mon, 24 Jul 2017 20:20:48 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

Op 23-07-2017 om 22:19 schreef Rishabh Dave:
I have attempted to write a patch for the first comment on this bug
page -

About the second comment, I couldn't replicate it. Nano didn't open an
empty buffer for me.

I don't know when this was fixed, but nano-2.3.6 exhibits this problem.

Besides these, patch also fixes the same issue when it appears in a
different scenario; when nano is invoked with multiple filenames
amongst which several are same nano would create buffers for each
filename irrespective of repitition. That is doing "src/nano README
TODO TODO" would create 2 buffers for TODO.

Your patch prevents that, but when doing:

  src/nano  TODO  ./TODO  doc/../TODO  /full/path/to/TODO

it will open the TODO file four times.  (When using --locking, it will
recognize that it's four times the same file, and will warn about that.
Your patch should be equally clever.)

Also, the original requester, suggested that nano should switch to
the buffer with the already-open file when the user tries to open it
again.  I think that would be good.  And the message could then become:
"File %s was already open".


reply via email to

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