Update of /cvsroot/tmux/tmux
In directory vz-cvs-2.sog:/tmp/cvs-serv3492

Modified Files:
        mode-key.c tmux.1 tmux.h window-copy.c 
Log Message:
Sync OpenBSD patchset 913:

Add three new copy-mode commands - select-line, copy-line,
copy-end-of-line. From Dave Disser and Randy Stauner a while back.


Index: window-copy.c
===================================================================
RCS file: /cvsroot/tmux/tmux/window-copy.c,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -d -r1.131 -r1.132
--- window-copy.c       18 May 2011 20:33:24 -0000      1.131
+++ window-copy.c       18 May 2011 20:35:36 -0000      1.132
@@ -500,6 +500,26 @@
                window_copy_start_selection(wp);
                window_copy_redraw_screen(wp);
                break;
+       case MODEKEYCOPY_COPYLINE:
+       case MODEKEYCOPY_SELECTLINE:
+               window_copy_cursor_start_of_line(wp);
+               /* FALLTHROUGH */
+       case MODEKEYCOPY_COPYENDOFLINE:
+               window_copy_start_selection(wp);
+               for (; np > 1; np--)
+                       window_copy_cursor_down(wp, 0);
+               window_copy_cursor_end_of_line(wp);
+               window_copy_redraw_screen(wp);
+
+               /* If a copy command then copy the selection and exit. */
+               if (sess != NULL &&
+                   (cmd == MODEKEYCOPY_COPYLINE ||
+                   cmd == MODEKEYCOPY_COPYENDOFLINE)) {
+                       window_copy_copy_selection(wp);
+                       window_pane_reset_mode(wp);
+                       return;
+               }
+               break;
        case MODEKEYCOPY_CLEARSELECTION:
                window_copy_clear_selection(wp);
                window_copy_redraw_screen(wp);

Index: mode-key.c
===================================================================
RCS file: /cvsroot/tmux/tmux/mode-key.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- mode-key.c  6 Apr 2011 22:23:30 -0000       1.48
+++ mode-key.c  18 May 2011 20:35:36 -0000      1.49
@@ -82,6 +82,8 @@
        { MODEKEYCOPY_BOTTOMLINE, "bottom-line" },
        { MODEKEYCOPY_CANCEL, "cancel" },
        { MODEKEYCOPY_CLEARSELECTION, "clear-selection" },
+       { MODEKEYCOPY_COPYLINE, "copy-line" },
+       { MODEKEYCOPY_COPYENDOFLINE, "copy-end-of-line" },
        { MODEKEYCOPY_COPYSELECTION, "copy-selection" },
        { MODEKEYCOPY_DOWN, "cursor-down" },
        { MODEKEYCOPY_ENDOFLINE, "end-of-line" },
@@ -110,6 +112,7 @@
        { MODEKEYCOPY_SEARCHDOWN, "search-forward" },
        { MODEKEYCOPY_SEARCHREVERSE, "search-reverse" },
        { MODEKEYCOPY_SEARCHUP, "search-backward" },
+       { MODEKEYCOPY_SELECTLINE, "select-line" },
        { MODEKEYCOPY_STARTNUMBERPREFIX, "start-number-prefix" },
        { MODEKEYCOPY_STARTOFLINE, "start-of-line" },
        { MODEKEYCOPY_STARTSELECTION, "begin-selection" },
@@ -198,6 +201,7 @@
        { ':',                  0, MODEKEYCOPY_GOTOLINE },
        { '?',                  0, MODEKEYCOPY_SEARCHUP },
        { 'B',                  0, MODEKEYCOPY_PREVIOUSSPACE },
+       { 'D',                  0, MODEKEYCOPY_COPYENDOFLINE },
        { 'E',                  0, MODEKEYCOPY_NEXTSPACEEND },
        { 'F',                  0, MODEKEYCOPY_JUMPBACK },
        { 'G',                  0, MODEKEYCOPY_HISTORYBOTTOM },
@@ -323,6 +327,7 @@
        { '\005' /* C-e */,     0, MODEKEYCOPY_ENDOFLINE },
        { '\006' /* C-f */,     0, MODEKEYCOPY_RIGHT },
        { '\007' /* C-g */,     0, MODEKEYCOPY_CLEARSELECTION },
+       { '\013' /* C-k */,     0, MODEKEYCOPY_COPYENDOFLINE },
        { '\016' /* C-n */,     0, MODEKEYCOPY_DOWN },
        { '\020' /* C-p */,     0, MODEKEYCOPY_UP },
        { '\022' /* C-r */,     0, MODEKEYCOPY_SEARCHUP },

Index: tmux.h
===================================================================
RCS file: /cvsroot/tmux/tmux/tmux.h,v
retrieving revision 1.623
retrieving revision 1.624
diff -u -d -r1.623 -r1.624
--- tmux.h      18 May 2011 20:30:14 -0000      1.623
+++ tmux.h      18 May 2011 20:35:36 -0000      1.624
@@ -457,6 +457,8 @@
        MODEKEYCOPY_BOTTOMLINE,
        MODEKEYCOPY_CANCEL,
        MODEKEYCOPY_CLEARSELECTION,
+       MODEKEYCOPY_COPYLINE,
+       MODEKEYCOPY_COPYENDOFLINE,
        MODEKEYCOPY_COPYSELECTION,
        MODEKEYCOPY_DOWN,
        MODEKEYCOPY_ENDOFLINE,
@@ -487,6 +489,7 @@
        MODEKEYCOPY_SEARCHDOWN,
        MODEKEYCOPY_SEARCHREVERSE,
        MODEKEYCOPY_SEARCHUP,
+       MODEKEYCOPY_SELECTLINE,
        MODEKEYCOPY_STARTNUMBERPREFIX,
        MODEKEYCOPY_STARTOFLINE,
        MODEKEYCOPY_STARTSELECTION,

Index: tmux.1
===================================================================
RCS file: /cvsroot/tmux/tmux/tmux.1,v
retrieving revision 1.312
retrieving revision 1.313
diff -u -d -r1.312 -r1.313
--- tmux.1      18 May 2011 20:30:14 -0000      1.312
+++ tmux.1      18 May 2011 20:35:36 -0000      1.313
@@ -14,7 +14,7 @@
 .\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
 .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd $Mdocdate: May 8 2011 $
+.Dd $Mdocdate: May 18 2011 $
 .Dt TMUX 1
 .Os
 .Sh NAME
@@ -770,7 +770,7 @@
 .It Li "Cursor to top line" Ta "H" Ta "M-R"
 .It Li "Cursor up" Ta "k" Ta "Up"
 .It Li "Delete entire line" Ta "d" Ta "C-u"
-.It Li "Delete to end of line" Ta "D" Ta "C-k"
+.It Li "Delete/Copy to end of line" Ta "D" Ta "C-k"
 .It Li "End of line" Ta "$" Ta "C-e"
 .It Li "Go to line" Ta ":" Ta "g"
 .It Li "Half page down" Ta "C-d" Ta "M-Down"


------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
tmux-cvs mailing list
tmux-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-cvs

Reply via email to