This looks pretty good on a quick look, although why do you need a
backing_written count? Why not write the CRLF after the line rather than before?

I'll try it later tonight.


On Sat, Feb 13, 2010 at 05:24:17PM -0800, Micah Cowan wrote:
> This is a code-only patch. I'll submit a separate one for the manual.
> 
> This patch eliminates "output" (or "more") mode, which is used to view
> command output within an attached tmux client. It's the mode you use
> when you type <prefix> ? to get a list of bindings.
> 
> Reasons behind this change:
>   - Now you can search and copy from the key-binding lists or option
>     settings (I've been wanting to do this).
>   - Ensures that "more" mode uses the {emacs,vi}-copy bindings, rather
>     than the {emacs,vi}-choice mode bindings, which seemed more natural
>     to me.
>   - Consolidates code. Less to maintain :)
> 
> Biggest changes in behavior
>   - If your copy-mode bindings differ from your choice-mode bindings,
>     you're now using the copy-mode ones.
>   - Output mode used to show how many lines from the top you are; copy
>     mode shows how many lines from the bottom (how far into "history").
>   - "Up" and "down" used to just scroll up and down; now they move the
>     cursor (and scroll if it's at the edges).
> 
> Application:
> 
> After applying the patch, please also remove (cvs remove) window-more.c,
> which is no longer used.
> 
> Details:
> 
> The code for copy-mode in window-copy.c assumed everywhere that it was
> "backed" by the window pane's "base" screen. This has been replaced by a
> generic "backing" screen.
> 
> It's no longer enough to simply set a pane into "copy" mode. You also
> then have to follow it with a call to window_copy_from_pane, which sets
> things up to work like normal copy mode, or you have to call
> window_copy_backing_init, which creates a fresh screen as the backing,
> for writing to.
> 
> Places that used to set window_more_mode and call window_more_(v)add,
> now set window_copy_mode, and call window_copy_backing_init, then
> window_more_(v)add.
> 
> A new flag was added to the screen structure, "wrap", which is normally
> set to true. It is set to false for the output-mode-style backing, so
> that lines are written fully (but don't display fully), and are
> available when you resize (enlarge) the pane (this mimics the behavior
> of output mode). Allowing writes to a grid line past the actual width of
> the grid necessitated the removal of all the grid_check_x invocations
> (and so I also eliminated the function definition). These were never
> really necessary anyway: grid lines longer than the grid width were
> already possible (when you shrink a pane; this lets them remain
> available for when you enlargen it again), but these checks merely
> prevented one from writing/reading the rest of the data past the grid width.
> 
> -- 
> 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