nano-devel
[Top][All Lists]
Advanced

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

Re: Possible new feature: use 'openfile' to open new buffer


From: Marco Diego Aurélio Mesquita
Subject: Re: Possible new feature: use 'openfile' to open new buffer
Date: Thu, 21 May 2020 23:02:22 -0300

On 5/21/20, Benno Schulenberg <address@hidden> wrote:
>
> Op 19-05-2020 om 20:40 schreef Marco Diego Aurélio Mesquita:
>> On 5/19/20, Benno Schulenberg <address@hidden> wrote:
>>> No, what I meant is: when --multibuffer and 'set multibuffer' are not
>>> used, then every invocation of ^R ('insert') will insert the read file
>>> into the current buffer, *even* when on the previous invocation M-F was
>>> toggled on.  And inversely, when --multibuffer or 'set multibuffer' ARE
>>> used, then every invocation of ^R will read a file into a new buffer,
>>> even when on the previous invocation M-F was toggled OFF.
>>
>> Sounds like a much simpler approach. Indeed, this would achieve what I
>> need without a new bindable function.
>
> But it would be a change in behavior.  We've done that before with
> ^W, and had one complaint from someone who used different versions
> of nano and found it annoying that the Backward flag was persistent
> in some versions and volatile in others.  Probably ^R is used less
> often than ^W (I hardly ever use ^R, neither to insert nor to open),
> but the effect of the flag is quite large.  So... I'm hesitant.
> But for you, as a frequent user of ^R, this change would be fine?
>

Yes this is fine for me. But I actually would like better a new
bindable function. Would not oppose the change in behaviour though.

>> By not having persistence on the MULTIBUFFER flag,
>
> Not "flag" but "toggle".  The flag and option (--multibuffer and
> 'set multibuffer') DO become persistent.
>
>> +    bool was_multibuffer = ISSET(MULTIBUFFER);
>
> Should be wrapped in #ifdef ENABLE_MULTIBUFFER.
> Same for the later fragment.
>


Attached is a new patch with the #ifdef wraps.

Thanks for reviewing.

Attachment: 0001-tweaks-make-insert-into-current-new-buffer-toggle-no.patch
Description: Text Data


reply via email to

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