Hi,
* On Mon, Nov 19, 2012 at 10:54:22AM +0000, Nicholas Marriott <nicholas.marri...@gmail.com> wrote:
n't like this behaviour at all, sorry. If you really want it make it a flag to select-window.
Thanks, I will make it like that.
Also don't goto the inside of if statements!
I will fix this as well.
On Sat, Nov 17, 2012 at 11:42:04PM +0530, Raghavendra D Prabhu wrote:This is to simulate a behavior similar to what is found in window managers where using the same key used to switched to the workspace returns to previous workspace; since this allows faster switching (by making use of locality of the key). Signed-off-by: Raghavendra D Prabhu <rpra...@wnohang.net> --- cmd-select-window.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cmd-select-window.c b/cmd-select-window.c index 5d87e59..103fd5b 100644 --- a/cmd-select-window.c +++ b/cmd-select-window.c @@ -130,7 +130,20 @@ cmd_select_window_exec(struct cmd *self, struct cmd_ctx *ctx) if (wl == NULL) return (CMD_RETURN_ERROR); + /* + * If select-window is invoked on same window as current, switch + * to previous window + */ + if (wl == s->curw) { + if (session_last(s) != 0) { + ctx->error(ctx, "no last window"); + return (-1); + } + goto redraw; + } + if (session_select(s, wl->idx) == 0) +redraw: server_redraw_session(s); } recalculate_sizes(); -- 1.8.0 ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users
Regards, -- Raghavendra Prabhu GPG Id : 0xD72BE977 Fingerprint: B93F EBCB 8E05 7039 CD3C A4B8 A616 DCA1 D72B E977 www: wnohang.net
pgpTEFA65fdBL.pgp
Description: PGP signature
------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users