Sync OpenBSD patchset 727:

Setting the cmdlist pointer in the bind-key to NULL to prevent it being freed
after the command is executing is bogus because it may still be needed if the
same command is going to be executed again (for example if you "bind-key a
bind-key b ..."). Making a copy is hard, so instead add a reference count to
the cmd_list.

While here, also print bind-key -n and the rest of the flags properly.

Fixes problem reported by mcbride@.

5 files changed
tree: 832957257356595b9739132bd7d72aeea410f7a7
  1. CHANGES
  2. FAQ
  3. GNUmakefile
  4. Makefile
  5. NOTES
  6. TODO
  7. array.h
  8. attributes.c
  9. cfg.c
  10. client.c
  11. clock.c
  12. cmd-attach-session.c
  13. cmd-bind-key.c
  14. cmd-break-pane.c
  15. cmd-capture-pane.c
  16. cmd-choose-buffer.c
  17. cmd-choose-client.c
  18. cmd-choose-session.c
  19. cmd-choose-window.c
  20. cmd-clear-history.c
  21. cmd-clock-mode.c
  22. cmd-command-prompt.c
  23. cmd-confirm-before.c
  24. cmd-copy-buffer.c
  25. cmd-copy-mode.c
  26. cmd-delete-buffer.c
  27. cmd-detach-client.c
  28. cmd-display-message.c
  29. cmd-display-panes.c
  30. cmd-find-window.c
  31. cmd-generic.c
  32. cmd-has-session.c
  33. cmd-if-shell.c
  34. cmd-join-pane.c
  35. cmd-kill-pane.c
  36. cmd-kill-server.c
  37. cmd-kill-session.c
  38. cmd-kill-window.c
  39. cmd-last-window.c
  40. cmd-link-window.c
  41. cmd-list-buffers.c
  42. cmd-list-clients.c
  43. cmd-list-commands.c
  44. cmd-list-keys.c
  45. cmd-list-panes.c
  46. cmd-list-sessions.c
  47. cmd-list-windows.c
  48. cmd-list.c
  49. cmd-load-buffer.c
  50. cmd-lock-client.c
  51. cmd-lock-server.c
  52. cmd-lock-session.c
  53. cmd-move-window.c
  54. cmd-new-session.c
  55. cmd-new-window.c
  56. cmd-next-layout.c
  57. cmd-next-window.c
  58. cmd-paste-buffer.c
  59. cmd-pipe-pane.c
  60. cmd-previous-layout.c
  61. cmd-previous-window.c
  62. cmd-refresh-client.c
  63. cmd-rename-session.c
  64. cmd-rename-window.c
  65. cmd-resize-pane.c
  66. cmd-respawn-window.c
  67. cmd-rotate-window.c
  68. cmd-run-shell.c
  69. cmd-save-buffer.c
  70. cmd-select-layout.c
  71. cmd-select-pane.c
  72. cmd-select-window.c
  73. cmd-send-keys.c
  74. cmd-send-prefix.c
  75. cmd-server-info.c
  76. cmd-set-buffer.c
  77. cmd-set-environment.c
  78. cmd-set-option.c
  79. cmd-set-window-option.c
  80. cmd-show-buffer.c
  81. cmd-show-environment.c
  82. cmd-show-messages.c
  83. cmd-show-options.c
  84. cmd-show-window-options.c
  85. cmd-source-file.c
  86. cmd-split-window.c
  87. cmd-start-server.c
  88. cmd-string.c
  89. cmd-suspend-client.c
  90. cmd-swap-pane.c
  91. cmd-swap-window.c
  92. cmd-switch-client.c
  93. cmd-unbind-key.c
  94. cmd-unlink-window.c
  95. cmd.c
  96. colour.c
  97. compat.h
  98. compat/
  99. configure
  100. environ.c
  101. examples/
  102. grid-utf8.c
  103. grid-view.c
  104. grid.c
  105. input-keys.c
  106. input.c
  107. job.c
  108. key-bindings.c
  109. key-string.c
  110. layout-set.c
  111. layout-string.c
  112. layout.c
  113. log.c
  114. mode-key.c
  115. names.c
  116. options.c
  117. osdep-darwin.c
  118. osdep-freebsd.c
  119. osdep-linux.c
  120. osdep-netbsd.c
  121. osdep-openbsd.c
  122. osdep-sunos.c
  123. osdep-unknown.c
  124. paste.c
  125. resize.c
  126. screen-redraw.c
  127. screen-write.c
  128. screen.c
  129. server-client.c
  130. server-fn.c
  131. server-window.c
  132. server.c
  133. session.c
  134. signal.c
  135. status.c
  136. tmux.1
  137. tmux.c
  138. tmux.h
  139. tools/
  140. tty-keys.c
  141. tty-term.c
  142. tty.c
  143. utf8.c
  144. window-choose.c
  145. window-clock.c
  146. window-copy.c
  147. window.c
  148. www/
  149. xmalloc.c
  150. xterm-keys.c