[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nano-devel] a proposed slight change in behaviour
From: |
Benno Schulenberg |
Subject: |
[Nano-devel] a proposed slight change in behaviour |
Date: |
Sat, 14 Jun 2014 16:34:06 +0200 |
Hi Mark and Chris,
On Fri, Jun 13, 2014, at 19:28, Mark Majeres wrote:
> The attached patch should move the cursor to the location it was in
> when the cut command was originally issued.
Yes. That works nicely. Thanks!
It went, modified, into SVN, in r4966.
However, while testing it, I came across a segfault (with current
SVN, but the issue also occurs with your patch unapplied).
Run 'src/nano +12,34 ChangeLog' and type:
<M-A> <ArrowDown> <^K> <^K> <M-U> <M-U>
Segmentation fault.
It seems that nano sees the two ^Ks as contiguous, but makes
some mistake in putting them into a single undo item.
To me it is clear that it should treat the two ^Ks as separate
and different. The first cuts a marked section, the second a
whole line. The two don't fit together. For example, try this:
'src/nano +12,23 ChangeLog' and type:
<M-A> <^Space> <^Space> <^Space> <^K> <^K> <^U>
Ow! That is unexpected. The line now reads:
"as holding only Meta the same Control."
instead of what I would have expected:
" Meta the same Control."
Chris? What does Pico do in this case? And if it is exactly
the same as Nano currently, do you agree that it is wrong?
I would like to propose the attached very simple patch:
reset the cutbuffer whenever a ^K resets the mark.
Would this slight change in behaviour be okay?
BTW, Mark, after an undo, the 'placewewant' isn't updated.
With attached patch applied, try this:
'src/nano +12,23 ChangeLog' and type:
<M-A> <^Space> <^Space> <^Space> <^K> <M-U> <Up>
Instead of going from "Control" to "Do", the cursor goes to
"(get_shortcut)".
Benno
--
http://www.fastmail.fm - Or how I learned to stop worrying and
love email again
reset-the-cutbuffer.patch
Description: Text Data
- Re: [Nano-devel] found a small failure in the undo stuff, Mark Majeres, 2014/06/07
- Re: [Nano-devel] found a small failure in the undo stuff, Benno Schulenberg, 2014/06/08
- Re: [Nano-devel] found a small failure in the undo stuff, Mark Majeres, 2014/06/08
- [Nano-devel] having text marked/selected, Benno Schulenberg, 2014/06/09
- Re: [Nano-devel] having text marked/selected, Benno Schulenberg, 2014/06/13
- Re: [Nano-devel] having text marked/selected, Mark Majeres, 2014/06/13
- [Nano-devel] a proposed slight change in behaviour,
Benno Schulenberg <=
- Re: [Nano-devel] a proposed slight change in behaviour, Benno Schulenberg, 2014/06/14
- Re: [Nano-devel] a proposed slight change in behaviour, Mark Majeres, 2014/06/14
- Re: [Nano-devel] a proposed slight change in behaviour, Mark Majeres, 2014/06/14
- Re: [Nano-devel] a proposed slight change in behaviour, Benno Schulenberg, 2014/06/17
- Re: [Nano-devel] a proposed slight change in behaviour, Chris Allegretta, 2014/06/16
- Re: [Nano-devel] a proposed slight change in behaviour, Benno Schulenberg, 2014/06/17
- Re: [Nano-devel] a proposed slight change in behaviour, Mark Majeres, 2014/06/17
- Re: [Nano-devel] a proposed slight change in behaviour, Chris Allegretta, 2014/06/17