Rewrite of choose mode, both to simplify and tidy the code and to add
some modern features.

Now the common code is in mode-tree.c, which provides an API used by the
three modes now separated into window-{buffer,client,tree}.c. Buffer
mode shows buffers, client mode clients and tree mode a tree of
sessions, windows and panes.

Each mode has a common set of key bindings plus a few that are specific
to the mode. Other changes are:

- each mode has a preview pane: for buffers this is the buffer content
  (very useful), for others it is a preview of the pane;

- items may be sorted in different ways ('O' key);

- multiple items may be tagged and an operation applied to all of them
  (for example, to delete multiple buffers at once);

- in tree mode a command may be run on the selected item (session,
  window, pane) or on tagged items (key ':');

- displayed items may be filtered in tree mode by using a format (this
  is used to implement find-window) (key 'f');

- the custom format (-F) for the display is no longer available;

- shortcut keys change from 0-9, a-z, A-Z which was always a bit weird
  with keys used for other uses to 0-9, M-a to M-z.

Now that the code is simpler, other improvements will come later.

Primary key bindings for each mode are documented under the commands in
the man page (choose-buffer, choose-client, choose-tree).

Parts written by Thomas Adam.
26 files changed
tree: 8a8a273bb54a7b4010b48b64a59aa5d3c3c96b55
  1. Makefile
  2. alerts.c
  3. arguments.c
  4. attributes.c
  5. cfg.c
  6. client.c
  7. cmd-attach-session.c
  8. cmd-bind-key.c
  9. cmd-break-pane.c
  10. cmd-capture-pane.c
  11. cmd-choose-tree.c
  12. cmd-command-prompt.c
  13. cmd-confirm-before.c
  14. cmd-copy-mode.c
  15. cmd-detach-client.c
  16. cmd-display-message.c
  17. cmd-display-panes.c
  18. cmd-find-window.c
  19. cmd-find.c
  20. cmd-has-session.c
  21. cmd-if-shell.c
  22. cmd-join-pane.c
  23. cmd-kill-pane.c
  24. cmd-kill-server.c
  25. cmd-kill-session.c
  26. cmd-kill-window.c
  27. cmd-list-buffers.c
  28. cmd-list-clients.c
  29. cmd-list-keys.c
  30. cmd-list-panes.c
  31. cmd-list-sessions.c
  32. cmd-list-windows.c
  33. cmd-list.c
  34. cmd-load-buffer.c
  35. cmd-lock-server.c
  36. cmd-move-window.c
  37. cmd-new-session.c
  38. cmd-new-window.c
  39. cmd-paste-buffer.c
  40. cmd-pipe-pane.c
  41. cmd-queue.c
  42. cmd-refresh-client.c
  43. cmd-rename-session.c
  44. cmd-rename-window.c
  45. cmd-resize-pane.c
  46. cmd-respawn-pane.c
  47. cmd-respawn-window.c
  48. cmd-rotate-window.c
  49. cmd-run-shell.c
  50. cmd-save-buffer.c
  51. cmd-select-layout.c
  52. cmd-select-pane.c
  53. cmd-select-window.c
  54. cmd-send-keys.c
  55. cmd-send-prefix.c
  56. cmd-set-buffer.c
  57. cmd-set-environment.c
  58. cmd-set-hook.c
  59. cmd-set-option.c
  60. cmd-show-buffer.c
  61. cmd-show-environment.c
  62. cmd-show-messages.c
  63. cmd-show-options.c
  64. cmd-source-file.c
  65. cmd-split-window.c
  66. cmd-string.c
  67. cmd-swap-pane.c
  68. cmd-swap-window.c
  69. cmd-switch-client.c
  70. cmd-unbind-key.c
  71. cmd-wait-for.c
  72. cmd.c
  73. colour.c
  74. control-notify.c
  75. control.c
  76. environ.c
  77. format.c
  78. grid-view.c
  79. grid.c
  80. hooks.c
  81. input-keys.c
  82. input.c
  83. job.c
  84. key-bindings.c
  85. key-string.c
  86. layout-custom.c
  87. layout-set.c
  88. layout.c
  89. log.c
  90. mode-key.c
  91. mode-tree.c
  92. names.c
  93. notify.c
  94. options-table.c
  95. options.c
  96. paste.c
  97. proc.c
  98. procname.c
  99. resize.c
  100. screen-redraw.c
  101. screen-write.c
  102. screen.c
  103. server-client.c
  104. server-fn.c
  105. server.c
  106. session.c
  107. signal.c
  108. status.c
  109. style.c
  110. tmux.1
  111. tmux.c
  112. tmux.h
  113. tty-acs.c
  114. tty-keys.c
  115. tty-term.c
  116. tty.c
  117. utf8.c
  118. window-buffer.c
  119. window-client.c
  120. window-clock.c
  121. window-copy.c
  122. window-tree.c
  123. window.c
  124. xmalloc.c
  125. xmalloc.h
  126. xterm-keys.c