nano-devel
[Top][All Lists]
Advanced

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

Re: [RFC] Should `afterends` affect word cutting?


From: Benno Schulenberg
Subject: Re: [RFC] Should `afterends` affect word cutting?
Date: Fri, 10 Apr 2020 19:55:12 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

Op 10-04-2020 om 04:43 schreef Liu Hao:
> At the moment, the `afterends` option in .nanorc doesn't affect cutting, which
> could be a bit inconvenient when editing source code.
> 
> For example, I have this line of C++ code:
> 
> ``` return this->something(); ```
> 
> When the cursor is between `->` and `something` [...], I may decide that I
> want to invoke a different function, so I press ^Delete. However, not only
> does this delete `something`, the `();` part is also deleted [even though]
> no character in it forms a word.

Nice example.  :)

I don't know why word chopping is not affected by the --afterends option.
When the option was added two years ago, the FALSE was not in the original
patch [1], but it was in the second version [2].  I don't know why.

I never user ^Delete / ^Backspace (I use <Ctrl+Shift+arrow> to select stuff
and then press <Delete>), so I have never noticed this behavior.  But seeing
your example, I think attached patch should be applied.

Is anyone opposed to changing the word-chopping behavior when --afterends
is in effect?

[1] https://lists.gnu.org/archive/html/nano-devel/2018-04/msg00024.html
[2] https://lists.gnu.org/archive/html/nano-devel/2018-04/msg00029.html

Benno

Attachment: let-afterends-affect-chopping-too.patch
Description: Text Data

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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