Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/tmux merge conflicts



details:   https://anonhg.NetBSD.org/src/rev/7af4ec8137ef
branches:  trunk
changeset: 466923:7af4ec8137ef
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Jan 06 21:03:23 2020 +0000

description:
merge conflicts

diffstat:

 external/bsd/tmux/dist/TODO                  |   161 --
 external/bsd/tmux/dist/client.c              |    18 +-
 external/bsd/tmux/dist/cmd-attach-session.c  |    29 +-
 external/bsd/tmux/dist/cmd-display-message.c |    18 +-
 external/bsd/tmux/dist/cmd-if-shell.c        |   109 +-
 external/bsd/tmux/dist/cmd-list.c            |   126 -
 external/bsd/tmux/dist/cmd-load-buffer.c     |     4 +-
 external/bsd/tmux/dist/cmd-new-session.c     |   119 +-
 external/bsd/tmux/dist/cmd-new-window.c      |   120 +-
 external/bsd/tmux/dist/cmd-parse.c           |  2056 --------------------------
 external/bsd/tmux/dist/cmd-parse.y           |     2 +-
 external/bsd/tmux/dist/cmd-queue.c           |   161 +-
 external/bsd/tmux/dist/cmd-send-keys.c       |    92 +-
 external/bsd/tmux/dist/cmd-set-hook.c        |   133 -
 external/bsd/tmux/dist/cmd-show-options.c    |   206 +-
 external/bsd/tmux/dist/cmd-split-window.c    |   172 +-
 external/bsd/tmux/dist/cmd-string.c          |   390 ----
 external/bsd/tmux/dist/cmd-wait-for.c        |     8 +-
 external/bsd/tmux/dist/colour.c              |    84 +-
 external/bsd/tmux/dist/compat/fparseln.c     |   216 --
 external/bsd/tmux/dist/environ.c             |    12 +-
 external/bsd/tmux/dist/format.c              |   402 ++++-
 external/bsd/tmux/dist/grid.c                |    51 +-
 external/bsd/tmux/dist/hooks.c               |   173 --
 external/bsd/tmux/dist/input-keys.c          |     7 +
 external/bsd/tmux/dist/input.c               |    96 +-
 external/bsd/tmux/dist/job.c                 |     2 +-
 external/bsd/tmux/dist/key-bindings.c        |    89 +-
 external/bsd/tmux/dist/menu.c                |     6 +-
 external/bsd/tmux/dist/mode-tree.c           |   144 +-
 external/bsd/tmux/dist/notify.c              |    80 +-
 external/bsd/tmux/dist/options.c             |   390 +++-
 external/bsd/tmux/dist/paste.c               |     9 +-
 external/bsd/tmux/dist/regsub.c              |     4 +-
 external/bsd/tmux/dist/screen-write.c        |    80 +-
 external/bsd/tmux/dist/server-client.c       |   304 ++-
 external/bsd/tmux/dist/server-fn.c           |     9 +-
 external/bsd/tmux/dist/session.c             |    71 +-
 external/bsd/tmux/dist/spawn.c               |     2 +-
 external/bsd/tmux/dist/status.c              |   149 +-
 external/bsd/tmux/dist/style.c               |    20 +-
 external/bsd/tmux/dist/tmux.1                |  1194 ++++++++++----
 external/bsd/tmux/dist/tmux.c                |     9 +-
 external/bsd/tmux/dist/tmux.h                |   370 +++-
 external/bsd/tmux/dist/tty-acs.c             |     8 +-
 external/bsd/tmux/dist/tty-keys.c            |    72 +-
 external/bsd/tmux/dist/tty-term.c            |    15 +-
 external/bsd/tmux/dist/tty.c                 |   206 ++-
 external/bsd/tmux/dist/utf8.c                |    29 +-
 external/bsd/tmux/dist/window-buffer.c       |    55 +-
 external/bsd/tmux/dist/window-client.c       |    32 +-
 external/bsd/tmux/dist/window-copy.c         |  1929 ++++++++++++++++++------
 external/bsd/tmux/dist/window-tree.c         |    49 +-
 external/bsd/tmux/dist/window.c              |   461 ++---
 external/bsd/tmux/usr.bin/tmux/Makefile      |    17 +-
 55 files changed, 5152 insertions(+), 5618 deletions(-)

diffs (truncated from 15593 to 300 lines):

diff -r 4b3358a348d1 -r 7af4ec8137ef external/bsd/tmux/dist/TODO
--- a/external/bsd/tmux/dist/TODO       Mon Jan 06 20:40:36 2020 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,161 +0,0 @@
-- command bits and pieces:
-       * allow multiple targets: fnmatch for -t/-c, for example detach all
-         clients with -t*
-       * ' and " should be parsed the same (eg "\e" vs '\e') in config
-         and command prompt
-       * last-pane across sessions
-       * resize-pane -p to match split-window -p
-       * flag to wait-for to have a timeout and/or to stop waiting when the
-         client gets a signal
-
-- make command sequences more usable
-       * don't require space after ;
-       * options for error handling: && and ||?
-
-- options bits and pieces:
-       * way to set socket path from config file
-
-- format improvements:
-       * some way to pad # stuff with spaces
-       * formats to show if a window is linked into multiple sessions, into
-         multiple attached sessions, and is the active window in multiple
-         attached sessions?
-       * comparison operators like < and > (for #{version}?)
-
-- improve monitor-*:
-       * straighten out rules for multiple clients
-       * think about what happens across sessions
-       * monitor changes within a region
-       * perhaps monitor /all/ panes in the window not just one
-
-- improve mouse support:
-       * bind commands to mouse in different areas?
-       * commands executed when clicking on a pattern (URL)
-
-- warts on current naming:
-       * display-time but message-fg/bg/attr
-       * list-* vs show-*
-
-- copy/paste improvements:
-       * paste w/o trailing whitespace
-       * command to toggle selection not to move it in copy-mode
-       * regex searching
-       * searching in copy mode should unwrap lines, so if you search for "foobar"
-         then it should be found even if it is now "foo\nbar" (if the WRAP flag
-         is set on the line)
-       * capture-pane option to preserve spaces but not join lines
-       * improve word and line selection in copy mode (for example when
-         dragging it should select by word. compare how xterm works. GitHub
-         issue 682)
-       * key to search for word under cursor (GitHub issue 1240)
-       * when entering copy mode, should copy grid so that input does not
-         need to be suspended
-       * allow the prefix for automatic buffers to be specified as part of the
-         key binding to allow session buffers or similar (GitHub issue 1501)
-       * copy-pipe should be synchronous (GitHub issue 1517)
-
-- layout stuff
-       * way to tag a layout as a number/name
-       * maybe keep last layout + size around and if size reverts just put it
-         back
-       * revamp layouts: they are too complicated, should be more closely
-         integrated, should support hints, layout sets should just be a
-         special case of custom layouts, and we should support panes that are
-         not attached to a cell at all. this could be the time to introduce
-         panelink to replace layout_cell
-       * way to set hints/limits about pane size for resizing
-       * a mode where one application can cross two panes (ie x|y, width =
-         COLUMNS/2 but height = ROWS * 2)
-       * separate active panes for different clients
-       * way to choose where the freed space goes when a pane is killed:
-         option to kill-pane? GitHub issue 918
-
-- code cleanup
-       * instead of separate window and session options, just one master
-         options list with each option having a type (window or session), then
-         options on window, on session, and global. for window options we look
-         window->session->global, and for session we look session->global.
-         problem: what about windows in multiple sessions? there are contexts
-         where we do not know which session, or where multiple choices makes
-         no sense... could at least have one global list for all types of
-         global options and keep separate window,session lists
-       * the way pane, window, session destroy is handled is too complicated
-         and the distinction between session.c, window.c and server-fn.c
-         functions is not clear. could we just have kill_pane(),
-         kill_window(), unlink_window(), kill_session() that fix up all data
-         structures (flagging sessions as dead) and return a value to say
-         whether clients need to be checked for dead sessions? sort of like
-         session_detach now but more so. or some other scheme to make it
-         simpler and clearer? also would be nice to remove/rename server-fn.c
-       * more readable way to work out the various things commands need to
-         know about the client, notably:
-               - is this the config file? (cmdq->c == NULL)
-               - is this a command client? (cmdq->c != NULL &&
-                 cmdq->c->session == NULL)
-               - is this a control client?
-               - can i do stdin or stdout to this client?
-         or even guarantee that cmdq->c != NULL and provide a better way to
-         tell when in the config file - then we use cmdq->c if we need a
-         client w/o a session else cmd_current_client
-
-- miscellaneous
-       * link panes into multiple windows
-       * live update: server started with -U connects to server, requests
-         sessions and windows, receives file descriptors
-       * there are inconsistencies in what we get from old shell and what
-         comes from config for new sessions and windows. likewise, panes and
-         jobs and run-shell and lock command all start with slightly different
-         environments
-       * multiline status line? separate command prompt and status line?
-       * automatic pane logging
-       * marks in history, automatically add (move?) one when pane is changed
-       * this doesn't work, need pane reference count probably:
-         bind -n DoubleClick3Status confirm-before -p "kill-window #I? (y/n)" kill-window
-       * marker lines in history (GitHub issue 1042)
-       * tree mode stuff: make command prompt (:) common code so all modes get it,
-         predefined filters, tag-all key, ...
-       * drag panes and windows around to move/swap them in choose mode
-       * flag to specify environment to new-window, split-window,
-          new-session (issue 1498)
-       * multiple column panes (issue 1503)
-       * support for ZERO WIDTH JOINER U+200D
-       * individual pane synchronize-panes (with pane options?); issue 1638
-
-- hooks
-       * more hooks for various things
-       * finish after hooks for special commands. these do not have a hook at
-         the moment:
-                attach-session detach-client kill-server respawn-window
-                swap-window break-pane find-window kill-session rotate-window
-                switch-client choose-tree if-shell kill-window run-shell
-                wait-for command-prompt join-pane move-window source-file
-                confirm-before kill-pane respawn-pane swap-pane
-         at the moment AFTERHOOK uses current only if target is not valid,
-         but target is ALWAYS valid - it should use current if no -t flag?
-         then select-* could use AFTERHOOK
-       * multiple hooks with the same name?
-       * finish hooks for notifys
-       * for session_closed, if no sessions at all, perhaps fake up a
-         temporary one
-
-- pan
-       * tty_window_offset should try to keep as much off active pane
-         visible as possible
-       * rather than centering cursor it might be better if only
-         moved offset when it gets close to an edge?
-
-----
-
-TODO soonish maybe:
-
-- Store hooks as options, issue 1619.
-- Support buffer prefixes, issue 1501.
-- copy-pipe should be synchronous, issue 1517.
-- -E flag to pass environment to new-*, issue 1498.
-- Copy mode searching is slow when there is a big history, issue 1545.
-- Grid "block" stuff, issue 1269. Can be used potentially for compression of
-  history (bit silly really though), reflow performance (can reflow blocks on
-  demand). It would possibly be good if history-limit could be global and
-  collected LRU.
-- Command aliases should be able to override builtin commands in order to add
-  default flags (some mechanism needed to avoid recursion). GitHub issue 1630.
diff -r 4b3358a348d1 -r 7af4ec8137ef external/bsd/tmux/dist/client.c
--- a/external/bsd/tmux/dist/client.c   Mon Jan 06 20:40:36 2020 +0000
+++ b/external/bsd/tmux/dist/client.c   Mon Jan 06 21:03:23 2020 +0000
@@ -202,7 +202,7 @@
        case CLIENT_EXIT_TERMINATED:
                return ("terminated");
        case CLIENT_EXIT_LOST_SERVER:
-               return ("lost server");
+               return ("server exited unexpectedly");
        case CLIENT_EXIT_EXITED:
                return ("exited");
        case CLIENT_EXIT_SERVER_EXITED:
@@ -215,14 +215,13 @@
 int
 client_main(struct event_base *base, int argc, char **argv, int flags)
 {
+       struct cmd_parse_result *pr;
        struct cmd              *cmd;
-       struct cmd_list         *cmdlist;
        struct msg_command_data *data;
        int                      cmdflags, fd, i;
        const char              *ttynam, *cwd;
        pid_t                    ppid;
        enum msgtype             msg;
-       char                    *cause;
        struct termios           tio, saved_tio;
        size_t                   size;
 
@@ -248,14 +247,15 @@
                 * later in server) but it is necessary to get the start server
                 * flag.
                 */
-               cmdlist = cmd_list_parse(argc, argv, NULL, 0, &cause);
-               if (cmdlist != NULL) {
-                       TAILQ_FOREACH(cmd, &cmdlist->list, qentry) {
+               pr = cmd_parse_from_arguments(argc, argv, NULL);
+               if (pr->status == CMD_PARSE_SUCCESS) {
+                       TAILQ_FOREACH(cmd, &pr->cmdlist->list, qentry) {
                                if (cmd->entry->flags & CMD_STARTSERVER)
                                        cmdflags |= CMD_STARTSERVER;
                        }
-                       cmd_list_free(cmdlist);
-               }
+                       cmd_list_free(pr->cmdlist);
+               } else
+                       free(pr->error);
        }
 
        /* Create client process structure (starts logging). */
@@ -436,7 +436,7 @@
        struct msg_stdin_data   data;
 
        data.size = read(STDIN_FILENO, data.data, sizeof data.data);
-       if (data.size < 0 && (errno == EINTR || errno == EAGAIN))
+       if (data.size == -1 && (errno == EINTR || errno == EAGAIN))
                return;
 
        proc_send(client_peer, MSG_STDIN, -1, &data, sizeof data);
diff -r 4b3358a348d1 -r 7af4ec8137ef external/bsd/tmux/dist/cmd-attach-session.c
--- a/external/bsd/tmux/dist/cmd-attach-session.c       Mon Jan 06 20:40:36 2020 +0000
+++ b/external/bsd/tmux/dist/cmd-attach-session.c       Mon Jan 06 21:03:23 2020 +0000
@@ -37,8 +37,8 @@
        .name = "attach-session",
        .alias = "attach",
 
-       .args = { "c:dErt:", 0, 0 },
-       .usage = "[-dEr] [-c working-directory] " CMD_TARGET_SESSION_USAGE,
+       .args = { "c:dErt:x", 0, 0 },
+       .usage = "[-dErx] [-c working-directory] " CMD_TARGET_SESSION_USAGE,
 
        /* -t is special */
 
@@ -48,7 +48,7 @@
 
 enum cmd_retval
 cmd_attach_session(struct cmdq_item *item, const char *tflag, int dflag,
-    int rflag, const char *cflag, int Eflag)
+    int xflag, int rflag, const char *cflag, int Eflag)
 {
        struct cmd_find_state   *current = &item->shared->current;
        enum cmd_find_type       type;
@@ -58,6 +58,7 @@
        struct winlink          *wl;
        struct window_pane      *wp;
        char                    *cause;
+       enum msgtype             msgtype;
 
        if (RB_EMPTY(&sessions)) {
                cmdq_error(item, "no sessions");
@@ -87,7 +88,7 @@
 
        if (wl != NULL) {
                if (wp != NULL)
-                       window_set_active_pane(wp->window, wp);
+                       window_set_active_pane(wp->window, wp, 1);
                session_set_current(s, wl);
                if (wp != NULL)
                        cmd_find_from_winlink_pane(current, wl, wp, 0);
@@ -102,11 +103,15 @@
 
        c->last_session = c->session;
        if (c->session != NULL) {
-               if (dflag) {
+               if (dflag || xflag) {
+                       if (xflag)
+                               msgtype = MSG_DETACHKILL;
+                       else
+                               msgtype = MSG_DETACH;
                        TAILQ_FOREACH(c_loop, &clients, entry) {
                                if (c_loop->session != s || c == c_loop)
                                        continue;
-                               server_client_detach(c_loop, MSG_DETACH);
+                               server_client_detach(c_loop, msgtype);
                        }
                }
                if (!Eflag)
@@ -131,11 +136,15 @@
                if (rflag)
                        c->flags |= CLIENT_READONLY;
 
-               if (dflag) {
+               if (dflag || xflag) {
+                       if (xflag)
+                               msgtype = MSG_DETACHKILL;
+                       else
+                               msgtype = MSG_DETACH;
                        TAILQ_FOREACH(c_loop, &clients, entry) {
                                if (c_loop->session != s || c == c_loop)
                                        continue;
-                               server_client_detach(c_loop, MSG_DETACH);
+                               server_client_detach(c_loop, msgtype);
                        }
                }
                if (!Eflag)
@@ -169,6 +178,6 @@



Home | Main Index | Thread Index | Old Index