Update of /cvsroot/tmux/tmux
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv31471

Modified Files:
        cmd-copy-mode.c 
Log Message:
Sync OpenBSD patchset 748:

Handle failure to change mode, to avoid dying when switching into copy
mode when already in a different mode. Reported by "Florian".


Index: cmd-copy-mode.c
===================================================================
RCS file: /cvsroot/tmux/tmux/cmd-copy-mode.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- cmd-copy-mode.c     5 Apr 2010 05:11:42 -0000       1.27
+++ cmd-copy-mode.c     11 Aug 2010 22:18:28 -0000      1.28
@@ -62,7 +62,8 @@
        if (cmd_find_pane(ctx, data->target, NULL, &wp) == NULL)
                return (-1);
 
-       window_pane_set_mode(wp, &window_copy_mode);
+       if (window_pane_set_mode(wp, &window_copy_mode) != 0)
+               return (0);
        window_copy_init_from_pane(wp);
        if (wp->mode == &window_copy_mode && cmd_check_flag(data->chflags, 'u'))
                window_copy_pageup(wp);


------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs

Reply via email to