Re: FIXED Re: [Patch] Replace output mode with copy mode

2010-02-17 Thread Nicholas Marriott
Yeah, whether or not va_start/va_arg/etc are nondestructive is completely an implementation detail, could vary with arch, compiler, stack layout etc. You have to use va_copy() if you want to use a va_list twice. On Tue, Feb 16, 2010 at 04:36:36PM -0800, Micah Cowan wrote: > The problem was that I

FIXED Re: [Patch] Replace output mode with copy mode

2010-02-16 Thread Micah Cowan
The problem was that I was using the same va_list twice, in window_copy_vadd; the first time uselessly in an xvasprintf whose result I never used (relic of a an approach I initially started with, but abandoned for the current use). No idea why it seemed to "work" okay in 32-bit, but anyway, obvious

WARNING Re: [Patch] Replace output mode with copy mode

2010-02-16 Thread Micah Cowan
WARNING WARNING WARNING While this patch seems to work fine on two of my laptops running 32-bit Ubuntu Karmic Koala (9.04), there seem to be stability issues when running from my work desktop running 64-bit Ubuntu Hardy Heron (8.04). For me, the symptoms are that the "showb" command produces garbl

Re: [Patch] Replace output mode with copy mode

2010-02-15 Thread Micah Cowan
Nicholas Marriott wrote: > 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? Well, not a count so much as a flag. I just didn't like an extra empty line at the bottom. This way we don't add a li

Re: [Patch] Replace output mode with copy mode

2010-02-15 Thread Nicholas Marriott
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

Re: [Patch] Replace output mode with copy mode

2010-02-14 Thread Micah Cowan
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 ? to get a list of bindings. Another caveat

Re: [Patch] Replace output mode with copy mode

2010-02-14 Thread Micah Cowan
Micah Cowan wrote: > + screen_write_start(&ctx, wp, &data->screen); > + ox = data->screen.cx; > + oy = data->screen.cy; > + > + /* If the history has changed, draw the top line. > + * (If there's any history at all, it has changed.) */ > + if (screen_hsize(data->backing)) >

Re: [Patch] Replace output mode with copy mode

2010-02-13 Thread Micah Cowan
Here's a diff for the manpage to go with the diff for the code. I've also included a convenience diff against the processed manpages, mans.diff, for an easier view of what I've changed. -- Micah J. Cowan http://micah.cowan.name/ --- /tmp/old 2010-02-13 21:00:37.921671553 -0800 +++ /tmp/new 2010-