Yegappan wrote:

> > The disadvantage is that branches that were visited before are gone. I
> > wonder if we could somehow remember them. The big question is what command
> > would navigate through this? With CTRL-I you would have to pick the branch
> > to go into. And you need to know where you are. Since jumps are not that
> > predictable that would be too complex.
> >
> > Perhaps we can use something similar to undo: add a timestamp to each
> > position, so that you can go back and forward in time. That would combine
> > the behavior with the option on and off, using different commands instead
> > of setting an option. We would need to remember two jumplists.
> >
> It makes sense to have multiple branches in the jump list and allow a user
> to
> browse through different branches. But why do we need to associate a
> timestamp with each jump location? Unlike the undo tree, why would a user
> need to go back in the jump list based on time?

Suppose you have a tree like this:

        A -- A1 -- A11
          -- A2 -- A22

So the user first jumps from A to A1, then to A11.
Then moves back up to A1 and A2, then jumps to A2 and A22.

Now suppose you want to go back to A11, which you visited before.
How do you get there?  Currently you just hit CTRL-O until you get
there, it should be somewhere up in the jump list, but it's a bit
unpredictable when you hit that entry in the jumplist.  And any jump you
do means you have to start all over going back.

When the proposed option, you can't, the location is lost.

Now, if we mark the positions with time (or just a sequence number), you
could so "go back N positions in time".  I think this requires
remembering when the position was first encountered, otherwise when
going back it would become the latest one.

It could use the jumplist as it is today, but mark the older entries
with a flag, as if they are "outdated".  And instead of adding a new
option, add commands that skip the "outdated" positions.  Then you get
both the old and new behavior without setting an option.  That's much
better, since you often don't know before hand what navigation you're
going to do.

-- 
hundred-and-one symptoms of being an internet addict:
238. You think faxes are old-fashioned.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202101251831.10PIVtIR3180793%40masaka.moolenaar.net.

Raspunde prin e-mail lui