Putting it at the bottom is harder, because where is the bottom? If you're running a full screen program the bottom is the very bottom. But if you have a clear screen with just eg 1 shell prompt on then the bottom needs to be line 2 or so.
We can always put it at the very bottom of the screen but then if you only have a few lines on screen you will lose them. On Tue, Aug 30, 2011 at 08:01:08AM -0700, Randy Stauner wrote: > -- (sorry, didn't mean to send this directly instead of to the list) -- > I don't use automatic rename in that session because of the large layout > with many windows and ssh connections. > This patch works nicely for me, thanks. > While this does serve the purpose, > I think it might be nicer/more intuitive to have the message at the bottom > (since that is where you typically expect the next thing). > The way that it scrolls backward confuses me a bit since i lose the last > line or two from the last command output. > Would it be difficult to print at the bottom instead of the top (without > scrolling backward (scrolling forward would be ok))? > I tried toying with it myself for a bit,**but when changing the numbers > passed to screen_write_scrollregion and screen_write_cursormove seemed to > have no effect I accepted that I was far out of my element and I should > defer to the master (plus I gotta get back to work). > But thanks for the quick response thus far! **I will use this. > > On Tue, Aug 30, 2011 at 2:55 AM, Nicholas Marriott > <[1]nicholas.marri...@gmail.com> wrote: > > In fact, try this: > > Index: server-fn.c > =================================================================== > RCS file: /cvs/src/usr.bin/tmux/server-fn.c,v > retrieving revision 1.50 > diff -u -p -r1.50 server-fn.c > --- server-fn.c 23 Jan 2011 11:03:43 -0000 ** ** **1.50 > +++ server-fn.c 30 Aug 2011 09:54:49 -0000 > @@ -329,16 +329,33 @@ server_unlink_window(struct session *s, > **void > **server_destroy_pane(struct window_pane *wp) > **{ > - ** ** ** struct window ** *w = wp->window; > + ** ** ** struct window ** ** ** ** ** *w = wp->window; > + ** ** ** int ** ** ** ** ** ** ** ** ** ** **old_fd; > + ** ** ** struct screen_write_ctx **ctx; > + ** ** ** struct grid_cell ** ** ** ** gc; > > + ** ** ** old_fd = wp->fd; > ** ** ** **if (wp->fd != -1) { > ** ** ** ** ** ** ** **close(wp->fd); > ** ** ** ** ** ** ** **bufferevent_free(wp->event); > ** ** ** ** ** ** ** **wp->fd = -1; > ** ** ** **} > > - ** ** ** if (options_get_number(&w->options, "remain-on-exit")) > + ** ** ** if (options_get_number(&w->options, "remain-on-exit")) { > + ** ** ** ** ** ** ** if (old_fd == -1) > + ** ** ** ** ** ** ** ** ** ** ** return; > + ** ** ** ** ** ** ** screen_write_start(&ctx, wp, &wp->base); > + ** ** ** ** ** ** ** screen_write_scrollregion(&ctx, 0, > screen_size_y(ctx.s) - 1); > + ** ** ** ** ** ** ** screen_write_cursormove(&ctx, 0, 0); > + ** ** ** ** ** ** ** screen_write_insertline(&ctx, 2); > + ** ** ** ** ** ** ** screen_write_cursormove(&ctx, 0, 0); > + ** ** ** ** ** ** ** memcpy(&gc, &grid_default_cell, sizeof gc); > + ** ** ** ** ** ** ** gc.attr |= GRID_ATTR_BRIGHT; > + ** ** ** ** ** ** ** screen_write_nputs(&ctx, -1, &gc, 0, "Pane is > dead"); > + ** ** ** ** ** ** ** screen_write_stop(&ctx); > + ** ** ** ** ** ** ** wp->flags |= PANE_REDRAW; > ** ** ** ** ** ** ** **return; > + ** ** ** } > > ** ** ** **layout_close_pane(wp); > ** ** ** **window_remove_pane(w, wp); > > On Tue, Aug 30, 2011 at 10:22:46AM +0100, Nicholas Marriott wrote: > > Hi > > > > If you have automatic rename on it will rename the window to add > [dead] > > but yes printing that in the pane wouldn't do any harm, I'll add it to > > the todo list. > > > > > > On Mon, Aug 29, 2011 at 10:15:12AM -0700, Randy Stauner wrote: > > > ** **My ssh connection died and it looked to me like the process > hung. > > > ** **Turns out I had remain-on-exit set but I did that so long ago I > forgot > > > ** **about it. > > > ** **It would be nice to have some sort of notification that this > pane is dead > > > ** **and you likely either want to kill it or respawn it. > > > ** **A window flag might be nice, though a message in the pane would > be a lot > > > ** **more visible. > > > ** **I try not to offend by comparing tmux to screen, > > > ** **but screen used to show a message like "This window is dead, > press 1 to > > > ** **respawn or 0 to kill" > > > ** **or something like that. > > > ** **Thankfully I've been happily using tmux for so long i don't > remember > > > ** **exactly how screen used to do it. > > > ** **I tried looking at a few of the .c files but I wasn't really > sure where to > > > ** **begin trying to put something like that, > > > ** **so I thought I'd just mention it as a feature request. > > > ** **I think a nice message at the end of the pane would be very > helpful to > > > ** **remind me why my terminal is now stuck. > > > ** **The only reason i use remain-on-exit is to keep my window > layout (numbers, > > > ** **names, ssh connections, etc). > > > ** **Now having taken the time to write this perhaps I'll remember > next time i > > > ** **see it. > > > ** **Thanks for tmux, it sure is nice. > > > ** **- Randy > > > > > > > ------------------------------------------------------------------------------ > > > EMC VNX: the world's simplest storage, starting under $10K > > > The only unified storage solution that offers unified management > > > Up to 160% more powerful than alternatives and 25% more efficient. > > > Guaranteed. [2]http://p.sf.net/sfu/emc-vnx-dev2dev > > > > > _______________________________________________ > > > tmux-users mailing list > > > [3]tmux-users@lists.sourceforge.net > > > [4]https://lists.sourceforge.net/lists/listinfo/tmux-users > > > > > > > > ------------------------------------------------------------------------------ > > Special Offer -- Download ArcSight Logger for FREE! > > Finally, a world-class log management solution at an even better > > price-free! And you'll get a free "Love Thy Logs" t-shirt when you > > download Logger. Secure your free ArcSight Logger TODAY! > > [5]http://p.sf.net/sfu/arcsisghtdev2dev > > _______________________________________________ > > tmux-users mailing list > > [6]tmux-users@lists.sourceforge.net > > [7]https://lists.sourceforge.net/lists/listinfo/tmux-users > > References > > Visible links > 1. mailto:nicholas.marri...@gmail.com > 2. http://p.sf.net/sfu/emc-vnx-dev2dev > 3. mailto:tmux-users@lists.sourceforge.net > 4. https://lists.sourceforge.net/lists/listinfo/tmux-users > 5. http://p.sf.net/sfu/arcsisghtdev2dev > 6. mailto:tmux-users@lists.sourceforge.net > 7. https://lists.sourceforge.net/lists/listinfo/tmux-users > ------------------------------------------------------------------------------ > Special Offer -- Download ArcSight Logger for FREE! > Finally, a world-class log management solution at an even better > price-free! And you'll get a free "Love Thy Logs" t-shirt when you > download Logger. Secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsisghtdev2dev > _______________________________________________ > tmux-users mailing list > tmux-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/tmux-users ------------------------------------------------------------------------------ Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free "Love Thy Logs" t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users