nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] [PATCH] Indicate open buffer count in title bar


From: Benno Schulenberg
Subject: Re: [Nano-devel] [PATCH] Indicate open buffer count in title bar
Date: Tue, 29 Aug 2017 21:29:00 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1


Hello Marco,

Op 28-08-2017 om 23:29 schreef Marco Diego Aurélio Mesquita:
Attached is a very simple patch to improve the multi-buffer feature in
nano. With the attached patch, nano displays the position of current
buffer (on the list of buffers) and the number of buffers.

Interesting.  It doesn't work correctly yet, though: when you have
just opened three files and then hit ^X, it will switch to the next
buffer but it will still say: [2/3].  Only after a ^L will it say
[1/2].

About the patch itself: I don't think it is guaranteed that memory
allocations happen in sequence, so you can't just compare pointers
to openfilestructs.  I would use a global variable (say: firstfile),
and then use one and the same function to count the number of buffers
(by passing firstfile_>prev) and to get the sequence number of the
current buffer (by passing openfile).

Also, when this "[x/y]" is present in the title bar, I find the
"File: " to be too much of a clutter.  I think it can be dropped
completely -- this inheritance from Pico is no longer needed.

It is quite quick and dirty right now, but my intention is to just get
feedback to arrive at something that can be accepted.

For it to get accepted, there will have to be some response from
other people, saying that they like and want this feature.

If this feature is implemented, I plan, on the future, to implement a
fast switching between buffers.

I will not accept that.  Switching between a handful or two handfuls
of buffers is pretty fast with Alt+Left and Alt+Right.  And anyway,
how is the user going to know which sequence number a specific file
has?  There is no sidebar or tabbar that shows this number, so the
user would have to memorize the numbers.  Using Alt+Left/Right is
probably easier and quicker then.

Currently (AFAIK) you can only go
backward and forward with buffers in nano; I plan to implement
something so that the user can hit M-n and switch to the n-th buffer.

M-3 and M-6 are already taken.  M-7, M-8, and M-9 too.  And needing
more than one keystroke to switch to a specific buffer...  No.

Benno




reply via email to

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