This looks fine apart from a couple of things:

- Why is the count a u_long? I don't see a need for it here, let's just use a
  u_int. Types that commonly change size depending on arch are stupid. In fact,
  I might go to far as to say we should put in a hard limit of 1000 repeats or
  something.

- Both macros have got to go.


On Sun, Feb 14, 2010 at 08:55:35PM -0800, Micah Cowan wrote:
> This patch allows you to supply repeat prefixes to commands in
> copy-mode. For instance, to move forward 10 characters, you'd type ???10l???
> ("ten ell") in vim, and ???M-1 0 C-f?? in emacs (of course, you could use
> the right arrow-key instead of ell or C-f).
> 
> The prefix keys are actually bound commands (to "start-number-prefix"),
>  so may be unbound if anyone finds them to be annoying, or you could
> rebind the emacs ones so you don't have to hold Alt while typing the
> first digit. They're mildly magical, as they trigger
> numeric-prefix-input mode, and (of course) insert themselves (sans any
> modifiers) as the first digit of the prefix.  The entry mode is
> automatically ended when you type a non-digit, and then the prefix is
> used for the command corresponding to the key you terminated with (if
> any). The "start-number-prefix" command performs no action when
> triggered by a non-digit key.
> 
> While these prefixes are currently only used for repeating a command,
> they don't necessarily have to have this semantic. For instance, the
> current "Goto Line" feature in copy mode would be much more natural to
> vi-mode as <line-number> G. Perhaps I will write a patch for that as
> well at some point, though I doubt I will unless there's demand for it,
> as unlike in Emacs or Vim, I _never_ wish to go to an arbitrary line in
> tmux's copy-mode.
> 
> Under-the-hood note: using this feature under the current patch results
> in spurious grid-redrawing, at least internally. Especially for commands
> that cause scrolling to take place. I don't really care, though, and I'm
> betting Nicholas doesn't either, since a patch to address that would be
> much more intrusive.
> 
> This patch applies cleanly after my other recent patches; it will
> require minor adjustment if applied without those.
> 
> -- 
> Micah J. Cowan
> http://micah.cowan.name/


> ------------------------------------------------------------------------------
> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
> http://p.sf.net/sfu/solaris-dev2dev

> _______________________________________________
> tmux-users mailing list
> tmux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tmux-users


------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to