On Fri 12 Jul 2013 at 09:48:33PM +0200, Ingo Karkat wrote:

> On the other hand (providing that one can still use
>     :keepjumps call setpos("''", getpos('.'))
>
> to get the old behavior (can you please confirm?!)),

Yes, I can confirm :keepjumps preserves the old behavior with this
patch.

> it might be more consistent if setpos() behaves exactly like the "m"
> command.

Well, I just took a closer look at :help setpos(), and I found:

    Does not change the jumplist.

Evidently this behavior is intentional to allow setpos() to move the
cursor without altering the jumplist. This also allows setting the ' and
` marks without a corresponding jump entry, which makes sense since the
previous context marks and jumplist are independent.

I can see the wisdom in this design (and therefore _rescind my patch_),
but there is a lack of symmetry: the pcmarks ' and ` can be set
independent of the jumplist, but the jumplist cannot be changed
independent of the pcmarks.

I believe it is worthwhile to add programmatic access to the jumplist.
For example, calling normal commands is sometimes impossible or
difficult (like within operator-pending mode mappings), whereas a
function call is always possible.

e.g. If I am unable to call ":normal m'", it would be great to have the
function appendjumplist().

Any feedback on this is appreciated.

    Thank you,
    Sung Pae

Attachment: pgpy1VLn_5sMg.pgp
Description: PGP signature

Raspunde prin e-mail lui