nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] [PATCH] new feature: the ability to set an anchor to wh


From: Marco Diego Aurélio Mesquita
Subject: Re: [Nano-devel] [PATCH] new feature: the ability to set an anchor to which one can jump
Date: Tue, 30 Oct 2018 17:25:08 -0300
User-agent: NeoMutt/20170113 (1.7.2)

On Sun, Oct 28, 2018 at 05:41:45PM +0100, Benno Schulenberg wrote:
> The function is bound by default to M-'.  A first press of M-'
> will set the anchor at the current cursor position.  A second
> press of M-' will clear the anchor if the cursor is already at
> the anchor, and otherwise will move the cursor to the anchor.
> (The anchor is not visible in any way.)

I think this can be implemented in a simpler and more powerful
way. Just adding a boolean member to filestruct would allow us to
have such functionality. I also think my suggested approach has
some advantages and make implementation of other features simpler:
  - once the line is removed, the anchor is also removed;

  - if lines are added before/after the anchor, the anchor is
  automagically moved;

  - multiple anchors could be set on the same buffer;

  - cycling through anchors or "go to next/previous anchor" would
  be easy to implement.

If you wish, I can come up with proof-of-concept of such a feature.



reply via email to

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