[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.
0001-tweaks-make-insert-into-current-new-buffer-toggle-no.patch
Description: Text Data
- Possible new feature: Use insert to try to insert file on current buffer, Marco Diego Aurélio Mesquita, 2020/05/14
- Re: Possible new feature: Use insert to try to insert file on current buffer, Benno Schulenberg, 2020/05/15
- Re: Possible new feature: Use insert to try to insert file on current buffer, Marco Diego Aurélio Mesquita, 2020/05/16
- Re: Possible new feature: use 'openfile' to open new buffer, Benno Schulenberg, 2020/05/19
- Re: Possible new feature: use 'openfile' to open new buffer, Marco Diego Aurélio Mesquita, 2020/05/19
- Re: Possible new feature: use 'openfile' to open new buffer, Benno Schulenberg, 2020/05/21
- Re: Possible new feature: use 'openfile' to open new buffer,
Marco Diego Aurélio Mesquita <=
- possible new bindable function: 'openfile', to open new buffer, Benno Schulenberg, 2020/05/28