On Tue, Aug 19, 2014 at 5:53 AM, Edward K. Ream <[email protected]> wrote:

> Happily, yesterday's work with k.getArg clarified the code enough that there
> is real hope that tab cycling can be restored better than ever.

This has been a complete success, with one special case that probably
nobody will notice.  Rev 3777f22...contains the code.

Notes:

1. The new code is clean.  ga.do_tab_cycling handles the actual work
all in one place.  However, ga.do_tab handles and important special
cases.  ga.do_tab is simple enough that this special cases are not
odious.

The special case is this:  tab cycling (but not tab completion!)
*must* be disabled for colon commands.  The reason is simple: when a
colon command is "completed" (shown fully) in the minibuffer, a tab
can cause filename completion.  There is *no way* to avoid this, so
for colon commands tab cycling must be prohibited.

2. ga.do_end and ga.do_back_space call ga.reset_cycling to invalidate
the cycling state.  This cleanly fixes former problems with tab
cycling.

===== Summary

I doubt if anyone will notice that tab works slightly differently in
colon commands than in other commands.  In any case, there is no real
alternative if we are to support both:

a) colon commands that use tab (not return) to start a file name.
b) tab cycling that uses tab to cycle through various commands.

I plan to take a break from programming today.  Time to recharge.

I'll remove the new_arg switch in a few days, after we are sure that
all aspects of the new key handling work.

Only one vim-related task remains: get the dot working reliably.  I
expect that will take several days.  I'll release Leo 4.12b1 shortly
thereafter.

Edward

P.S.  Strictly speaking, tab cycling doesn't have to be disabled for
all colon commands.  One could imaging a list of commands that use tab
to complete file names.  Otoh, maintaining that list would be clumsy,
and it would add still more special cases to ga.do_tab.  I see no
reason to do anything like this at present.

EKR

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to