Commit Graph

  • 9a07e8f372 Sync OpenBSD patchset 147: Tiago Cunha 2009-07-20 16:01:07 +00:00
  • e8957009c7 Sync OpenBSD patchset 146: Tiago Cunha 2009-07-20 15:57:05 +00:00
  • c0862dae45 Tweak unbind-key language very slightly. Nicholas Marriott 2009-07-20 15:51:55 +00:00
  • 62017452e9 Sync OpenBSD patchset 145: Tiago Cunha 2009-07-20 15:51:32 +00:00
  • 16f424d25d Sync OpenBSD patchset 144: Tiago Cunha 2009-07-20 15:48:54 +00:00
  • 95d593dd51 Sync OpenBSD patchset 143: Tiago Cunha 2009-07-20 15:46:55 +00:00
  • 545893df73 Sync OpenBSD patchset 142: Tiago Cunha 2009-07-20 15:42:05 +00:00
  • 54afcfbfb4 Display the number of failed password attempts (if any) when the server is locked. From Tom Doherty. Nicholas Marriott 2009-07-20 14:37:51 +00:00
  • b292f71c49 Add a status-justify option to allow the window list in the status line to be positioned at the left, centre, or right. Nicholas Marriott 2009-07-20 14:32:09 +00:00
  • e32e0d5692 New options, window-status-current-{fg,bg,attr}, to set the fg, bg and attributes with which the current window is shown in the status line. From Johan Friis, thanks. Nicholas Marriott 2009-07-20 09:15:18 +00:00
  • 73732ffa05 Kill some dead stores and fix a null pointer deref, found by clang. Nicholas Marriott 2009-07-20 07:31:10 +00:00
  • ff2cc0e387 Move the offsets as well when swapping panes. Nicholas Marriott 2009-07-20 07:13:31 +00:00
  • 680f2098f1 With gcc4, turn off unnecessart pointer sign warnings. Nicholas Marriott 2009-07-20 05:40:13 +00:00
  • 376c808b50 Add three new session options: visual-activity, visual-bell, visual-content. If these are enabled (and the monitor-activity, bell-action and monitor-content options are configurated appropriately), when activity, a bell, or content is detected, a message is shown. Tiago Cunha 2009-07-19 14:35:56 +00:00
  • 550b855c9d tweak previous; Jason McIntyre 2009-07-19 14:07:47 +00:00
  • 4cf6396e4c Change a couple of screenshots which had screen in them now I've got rid of screen on that box too :-). Nicholas Marriott 2009-07-19 13:52:51 +00:00
  • 6036bdd06c Improved layout code. Nicholas Marriott 2009-07-19 13:21:40 +00:00
  • 17170f5d6e Add a -k flag to unlink-window which makes it behave the same as the old kill-window - if a window is linked into only one session it unlinked and destroyed. Tiago Cunha 2009-07-19 00:39:37 +00:00
  • fc6a65c620 Add three new session options: visual-activity, visual-bell, visual-content. If these are enabled (and the monitor-activity, bell-actio and monitor-content options are configurated appropriately), when activity, a bell, or content is detected, a message is shown. Nicholas Marriott 2009-07-18 14:59:25 +00:00
  • 19cb1fb592 Make it so using kill-pane to destroy the last pane in a window destroys the window instead of being an error. Nicholas Marriott 2009-07-18 11:07:14 +00:00
  • c30fbd1d8d When resizing a screen smaller in alternate screen mode, all the lines needed could be consumed by deleting from the bottom, leaving none to be removed from the top. In this case, don't call grid_view_delete_lines with ny of 0 as this is incorrect and causes a bounds check to fatal error if built with -DDEBUG. Nicholas Marriott 2009-07-18 11:06:35 +00:00
  • 6bc9ee3420 Tidy up new-session and attach-session and change them to work from inside tmux, switching the current client to the new or requested session. Nicholas Marriott 2009-07-18 11:06:09 +00:00
  • 4192449112 Remove a duplicate key binding, and turn off autorepeat for up/down as it is kind of annoying by default. Nicholas Marriott 2009-07-18 11:05:45 +00:00
  • f1efd6b4e7 If -u is specified or UTF-8 is otherwise detected when the server is started, enable the utf8 and status-utf8 optons. While here, note in the man page that the server is started with the first session and exits when none remain. Nicholas Marriott 2009-07-18 11:05:13 +00:00
  • 0ca6f667e3 Make it so using kill-pane to destroy the last pane in a window destroys the window instead of being an error. Nicholas Marriott 2009-07-17 20:37:03 +00:00
  • 6f5150a943 - New command display-message (alias display) to display a message in the status line (bound to "i" and displays the current window and time by default). The same substitutions are applied as for status-left/right. - Add support for including the window index (#I), pane index (#P) and window name (#W) in the message, and status-left or status-right. - Bump protocol version. Nicholas Marriott 2009-07-17 18:45:08 +00:00
  • 21cfef45d6 When resizing a screen smaller in alternate screen mode, all the lines needed could be consumed by deleting from the bottom, leaving none to be removed from the top. In this case, don't call grid_view_delete_lines with ny of 0 as this is incorrect and causes a bounds check to fatal error if built with -DDEBUG. Nicholas Marriott 2009-07-17 18:35:55 +00:00
  • ad006bc6b6 When resizing a screen smaller in alternate screen mode, all the lines needed could be consumed by deleting from the bottom, leaving none to be removed from the top. In this case, don't call grid_view_delete_lines with ny of 0 as this is incorrect and causes a bounds check to fatal error if built with -DDEBUG. Nicholas Marriott 2009-07-17 18:35:11 +00:00
  • ae7dda10ce - New command display-message (alias display) to display a message in the status line (bound to "i" by default). - Add support for including the window index, pane index, and window name in status-left, or status-right. - Bump protocol version. Tiago Cunha 2009-07-17 18:32:54 +00:00
  • 646632de1d Update TODO. Nicholas Marriott 2009-07-17 18:05:06 +00:00
  • 770ea563ee Changed the wrong thing here. Nicholas Marriott 2009-07-17 15:56:46 +00:00
  • ce53936a2b Tidy up new-session and attach-session and change them to work from inside tmux, switching the current client to the new or requested session. Nicholas Marriott 2009-07-17 15:03:11 +00:00
  • 1938c994e7 Remove a duplicate key binding, and turn off autorepeat for up/down as it is kind of annoying by default. Nicholas Marriott 2009-07-17 13:43:07 +00:00
  • 7ddba901a4 If -u is specified or UTF-8 is otherwise detected when the server is started, enable the utf8 and status-utf8 optons. While here, note in the man page that the server is started with the first session and exits when none remain. Nicholas Marriott 2009-07-17 13:38:03 +00:00
  • 946affe60d Stupid cvsps. Nicholas Marriott 2009-07-17 12:35:01 +00:00
  • 89543e999d A similar for fix for window_choose: don't rely on the callback always being called to free data, have a separate free callback and call it from the mode cleanup code. Nicholas Marriott 2009-07-17 12:12:54 +00:00
  • fc17ce0150 Oops, it is always a good idea to get arguments the right way round. Nicholas Marriott 2009-07-17 09:28:27 +00:00
  • 441c118b63 Memory could be leaked if a second prompt or message appeared while another was still present, so add a separate prompt free callback and make the _clear function responsible for calling it if necessary (rather than the individual Nicholas Marriott 2009-07-17 09:26:21 +00:00
  • ac55534055 Remove some duplicate code that was causing the status line to be redrawn even when it hadn't changed. Nicholas Marriott 2009-07-17 07:46:08 +00:00
  • 821de39b27 Fix arguments to switch-client. Nicholas Marriott 2009-07-17 07:45:42 +00:00
  • ede2dd2d3a Typo in grid_duplicate_lines (sy for dy) causing it to write into the wrong place when copying UTF-8 data. Found by Dan Colish. Nicholas Marriott 2009-07-17 07:45:08 +00:00
  • d3b5c242cc Oops, it is always a good idea to get arguments the right way round. Nicholas Marriott 2009-07-17 07:09:46 +00:00
  • 216df07688 A similar for fix for window_choose: don't rely on the callback always being called to free data, have a separate free callback and call it from the mode cleanup code. Nicholas Marriott 2009-07-17 07:05:58 +00:00
  • 65deba3a35 Memory could be leaked if a second prompt or message appeared while another was still present, so add a separate prompt free callback and make the _clear function responsible for calling it if necessary (rather than the individual prompt callbacks). Also make both messages and prompts clear any existing when a new is set. Nicholas Marriott 2009-07-17 06:13:27 +00:00
  • 9642f0373f Remove some duplicate code that was causing the status line to be redrawn even when it hadn't changed. Nicholas Marriott 2009-07-16 23:25:21 +00:00
  • 3e9d9a2119 Fix arguments to switch-client. Nicholas Marriott 2009-07-16 22:50:49 +00:00
  • 08d32a1522 Update TODO. Nicholas Marriott 2009-07-16 07:35:41 +00:00
  • d956ed0760 Typo in grid_duplicate_lines (sy for dy) causing it to write into the wrong place when copying UTF-8 data. Found by Dan Colish. Nicholas Marriott 2009-07-16 07:35:35 +00:00
  • 924bf8477f Typo in grid_duplicate_lines (sy for dy) causing it to write into the wrong place when copying UTF-8 data. Found by Dan Colish. Nicholas Marriott 2009-07-16 07:34:37 +00:00
  • 6fe25a08d7 Improved NetBSD current-process detection from Roy Marples. Nicholas Marriott 2009-07-15 17:53:15 +00:00
  • 222b8e6743 Make status_message_set a variadic printf-like function. No functional change - helpful for a couple of things coming soon. Nicholas Marriott 2009-07-15 17:50:11 +00:00
  • d6908dd9c2 Return -1 not NULL on error, pointed out by Roy Marples. Nicholas Marriott 2009-07-15 17:46:09 +00:00
  • ac2ab6501d Add a -k flag to unlink-window which makes it behave the same as the old kill-window - if a window is linked into only one session it unlinked and destroyed. Nicholas Marriott 2009-07-15 17:45:29 +00:00
  • 8bfbc8c61d The man page says that kill-window removes the window entirely, unlinking it from any sessions. In fact the implementation only affected the current session, making it the same as unlink-window but destroying the window if it was linked into only one session (unlinkw gives an error). Change the behaviour to match what it documented and was originally intended. Nicholas Marriott 2009-07-15 17:45:09 +00:00
  • ff90170738 Having to update NSETOPTION/NSETWINDOWOPTION when adding new options is a bit annoying and it is only use for iterating, so use a sentinel to mark the end of each array instead. Different fix for a problem pointed out by Kalle Olavi Niemitalo. Nicholas Marriott 2009-07-15 17:44:47 +00:00
  • 6ebb1df8fe Add main-pane-height to the options list (was missed before). Nicholas Marriott 2009-07-15 17:44:25 +00:00
  • ff500b46c9 For some reason when clearing status/message it was redrawing the entire client not just the status line. Changing this also revealed the check for the status line was incorrect when drawing the pane. Nicholas Marriott 2009-07-15 17:44:06 +00:00
  • 72d56bd614 Instead of faking up a status line in status_redraw, use the same code to redraw it as to draw the entire screen, just skip all lines but the last. Nicholas Marriott 2009-07-15 17:43:45 +00:00
  • ad1945c278 Don't accept input to a window if it not visible. Nicholas Marriott 2009-07-15 17:43:21 +00:00
  • 82b45b460e The scroll region cannot be one line only, ignore attempts to make it so. Nicholas Marriott 2009-07-15 17:43:02 +00:00
  • 1e574bb70c Get rid of the PANE_HIDDEN flag in favour of a function, and moving the decision for whether or not a pane should be drawn out of the layout code and into the redraw code. Nicholas Marriott 2009-07-15 17:42:44 +00:00
  • 92da443a9e Make status_message_set a variadic printf-like function. No functional change - helpful for a couple of things coming soon. Nicholas Marriott 2009-07-15 17:39:00 +00:00
  • 780fd8f7a6 Return -1 not NULL on error, pointed out by Roy Marples. Nicholas Marriott 2009-07-15 15:09:17 +00:00
  • aa3403a343 Add a -k flag to unlink-window which makes it behave the same as the old kill-window - if a window is linked into only one session it unlinked and destroyed. Nicholas Marriott 2009-07-15 08:05:56 +00:00
  • 9601b72e4c The man page says that kill-window removes the window entirely, unlinking it from any sessions. In fact the implementation only affected the current session, making it the same as unlink-window but destroying the window if it was linked into only one session (unlinkw gives an error). Change the behaviour to match what it documented and was originally intended. Nicholas Marriott 2009-07-15 08:00:49 +00:00
  • ca617d679f Having to update NSETOPTION/NSETWINDOWOPTION when adding new options is a bit annoying and it is only use for iterating, so use a sentinel to mark the end of each array instead. Different fix for a problem pointed out by Kalle Olavi Niemitalo. Nicholas Marriott 2009-07-15 07:50:34 +00:00
  • 615d85fb23 Add main-pane-height to the options list (was missed before). Nicholas Marriott 2009-07-14 20:20:04 +00:00
  • f08c9b2217 For some reason when clearing status/message it was redrawing the entire client not just the status line. Changing this also revealed the check for the status line was incorrect when drawing the pane. Nicholas Marriott 2009-07-14 19:11:58 +00:00
  • ae2ea52575 Instead of faking up a status line in status_redraw, use the same code to redraw it as to draw the entire screen, just skip all lines but the last. Nicholas Marriott 2009-07-14 19:03:16 +00:00
  • 537c32b6b6 Escape ~, pointed out by tcunha. Nicholas Marriott 2009-07-14 17:44:24 +00:00
  • e76caa0017 Don't accept input to a window if it not visible. Nicholas Marriott 2009-07-14 16:52:50 +00:00
  • 975f516f51 The scroll region cannot be one line only, ignore attempts to make it so. Nicholas Marriott 2009-07-14 14:47:32 +00:00
  • fe20c0d89e Get rid of the PANE_HIDDEN flag in favour of a function, and moving the decision for whether or not a pane should be drawn out of the layout code and into the redraw code. Nicholas Marriott 2009-07-14 07:23:36 +00:00
  • f44ae0535e Need time.h not sys/time.h for time(2). Nicholas Marriott 2009-07-14 07:01:03 +00:00
  • 4a9b01eb0d Need time.h not sys/time.h for time(2). Nicholas Marriott 2009-07-14 06:59:06 +00:00
  • 6910458a92 Add backspace key to named keys. Nicholas Marriott 2009-07-14 06:56:30 +00:00
  • 910d6282c4 Whoops, chose the wrong one in a conflict. Revert. Nicholas Marriott 2009-07-14 06:54:38 +00:00
  • 20e322bf9b arg.c is no longer required. Nicholas Marriott 2009-07-14 06:47:46 +00:00
  • edd3142d1f Don't need ncurses, use curses. Nicholas Marriott 2009-07-14 06:47:12 +00:00
  • 097b96ea44 Having fixed flags for single-character getopt options is a bit hard to maintain and is only going to get worse as more are used. So instead, add a new uint64_t member to cmd_entry which is a bitmask of upper and lowercase options accepted by the command. Nicholas Marriott 2009-07-14 06:43:33 +00:00
  • 5ccd0025a0 copy-mode and scroll-mode have a -u flag missing from usage, add it. Nicholas Marriott 2009-07-14 06:42:22 +00:00
  • d358a352c0 Tidy up and improve target (-t) argument parsing: Nicholas Marriott 2009-07-14 06:42:06 +00:00
  • e63567d51c Support "alternate screen" mode (terminfo smcup/rmcup) typically used by full screen interactive programs to preserve the screen contents. When activated, it saves a copy of the visible grid and disables scrolling into and resizing out of the history; when deactivated the visible data is restored and the history reenabled. Nicholas Marriott 2009-07-14 06:40:33 +00:00
  • f41ef2198b Missed this declaration in key bindings change. Whoops. Nicholas Marriott 2009-07-14 06:40:03 +00:00
  • 61bd3ae1c6 Document the -k flag to new-window. Nicholas Marriott 2009-07-14 06:39:44 +00:00
  • 5ef5bd7c31 Add a "back to indentation" key in copy mode to move the cursor to the first non-whitespace character. ^ with vi and M-m with emacs key bindings. Another from Kalle Olavi Niemitalo, thanks. Nicholas Marriott 2009-07-14 06:39:25 +00:00
  • 7f98193beb Merge three copies of identical code to move the cursor x position into a single function, from Kalle Olavi Niemitalo. Nicholas Marriott 2009-07-14 06:38:32 +00:00
  • d2c3dbc665 If it exist, load a system-wide configuration file /etc/tmux.conf before any user-specified one. Nicholas Marriott 2009-07-14 06:38:14 +00:00
  • ceace9c6bd Since tmux doesn't actually need ncurses, use -lcurses/curses.h instead. Pointed out by millert a while ago. Nicholas Marriott 2009-07-14 06:30:45 +00:00
  • 5f108d9df6 Having fixed flags for single-character getopt options is a bit hard to maintain and is only going to get worse as more are used. So instead, add a new uint64_t member to cmd_entry which is a bitmask of upper and lowercase options accepted by the command. Nicholas Marriott 2009-07-13 23:11:35 +00:00
  • 5d91555c7c zap trailing whitespace; Jason McIntyre 2009-07-13 20:14:23 +00:00
  • cba885a67c Expand leading tildes in arguments, from Tiage Cunha. Nicholas Marriott 2009-07-13 18:49:36 +00:00
  • cf411053c7 copy-mode and scroll-mode have a -u flag missing from usage, add it. Nicholas Marriott 2009-07-13 18:44:17 +00:00
  • 2f75b07d08 Update. Tiago Cunha 2009-07-13 18:29:28 +00:00
  • 280619a4e8 Expand leading tilde on commands which expect a filename. Tiago Cunha 2009-07-13 18:03:18 +00:00
  • 023d8d38ec Tidy up and improve target (-t) argument parsing: Nicholas Marriott 2009-07-13 17:47:46 +00:00
  • 6db6df882c Update. Nicholas Marriott 2009-07-13 11:33:06 +00:00
  • 359285928b Support "alternate screen" mode (terminfo smcup/rmcup) typically used by full screen interactive programs to preserve the screen contents. When activated, it saves a copy of the visible grid and disables scrolling into and resizing out of the history; when deactivated the visible data is restored and the history reenabled. Nicholas Marriott 2009-07-13 10:43:52 +00:00
  • db411ca515 Update TODO. Nicholas Marriott 2009-07-13 06:29:19 +00:00
  • 0b788a3d61 Missed this declaration in key bindings change. Whoops. Nicholas Marriott 2009-07-12 23:46:49 +00:00