Commit Graph

1571 Commits (35b926c4459df017cd9b08611a1b8e11e0eb425f)

Author SHA1 Message Date
Tiago Cunha 39aa8b32b1 Restore $Id$. 2009-07-22 16:55:22 +00:00
Tiago Cunha 1bf524c1b7 Sync OpenBSD patchset 152:
__progname is not const, pointed out by deraadt.

And, as a consequence change its declaration for operating systems which
don't provide __progname as well.
2009-07-22 16:53:30 +00:00
Tiago Cunha a734488a4b Sync OpenBSD patchset 151:
Tidy up keys: use an enum for the key codes, and remove the macros which just
wrap flag sets/clears/tests.
2009-07-22 16:24:59 +00:00
Nicholas Marriott 94e2339842 OpenSolaris ioctl(TIOCSWINSZ) appears to be broken and can return EINVAL here
despite sx, sy and fd being fine (an fcntl on the fd succeeds). No problems on
other platforms so ignore the error under #ifdef __sun__.
2009-07-22 12:42:57 +00:00
Tiago Cunha 5263b3f61e Sync OpenBSD patchset 150:
Now that #P could be in the status line, flag it for redraw when the active
pane changes.
2009-07-21 16:27:41 +00:00
Nicholas Marriott 962b9c6548 Include .depend in GNUmakefile since GNU make does not include it
automatically.

Also remove .depend from clean target and add a clean-depend target.
2009-07-21 13:51:30 +00:00
Nicholas Marriott 48c36d628a No paths.h in cmd.c; add _PATH_DEV for Solaris. 2009-07-21 13:07:50 +00:00
Nicholas Marriott e2a80151ae Update. 2009-07-21 13:07:14 +00:00
Tiago Cunha 2572c7139b Sync OpenBSD patchset 149:
Tweak unbind-key language very slightly.
2009-07-20 17:08:48 +00:00
Tiago Cunha e7cda4f363 Update. 2009-07-20 17:06:13 +00:00
Tiago Cunha 54c6848d75 Sync OpenBSD patchset 148:
Display the number of failed password attempts (if any) when the server is
locked. From Tom Doherty.
2009-07-20 16:07:23 +00:00
Tiago Cunha 9a07e8f372 Sync OpenBSD patchset 147:
Add a status-justify option to allow the window list in the status line to be
positioned at the left, centre, or right.
2009-07-20 16:01:07 +00:00
Tiago Cunha e8957009c7 Sync OpenBSD patchset 146:
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.
2009-07-20 15:57:05 +00:00
Tiago Cunha 62017452e9 Sync OpenBSD patchset 145:
Kill some dead stores and fix a null pointer deref, found by clang.
2009-07-20 15:51:32 +00:00
Tiago Cunha 16f424d25d Sync OpenBSD patchset 144:
Move the offsets as well when swapping panes.
2009-07-20 15:48:54 +00:00
Tiago Cunha 95d593dd51 Sync OpenBSD patchset 143:
tweak previous;
2009-07-20 15:46:55 +00:00
Tiago Cunha 545893df73 Sync OpenBSD patchset 142:
Each window now has a tree of layout cells associated with it. In this tree,
each node is either a horizontal or vertical cell containing a list of other
cells running from left-to-right or top-to-bottom, or a leaf cell which is
associated with a pane.

The major functional changes are:

- panes may now be split arbitrarily both horizontally (splitw -h, C-b %) and
  vertically (splitw -v, C-b ");
- panes may be resized both horizontally and vertically (resizep -L/-R/-U/-D,
  bound to C-b left/right/up/down and C-b M-left/right/up/down);
- layouts are now applied and then may be modified by resizing or splitting
  panes, rather than being fixed and reapplied when the window is resized or
  panes are added;
- manual-vertical layout is no longer necessary, and active-only layout is gone
  (but may return in future);
- the main-pane layouts now reduce the size of the main pane to fit all panes
  if possible.

Thanks to all who tested.
2009-07-20 15:42:05 +00:00
Nicholas Marriott 680f2098f1 With gcc4, turn off unnecessart pointer sign warnings. 2009-07-20 05:40:13 +00:00
Tiago Cunha 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.

Also tidy up the bell/activity/content code in server.c slightly and fix a
couple of errors.
2009-07-19 14:35:56 +00:00
Nicholas Marriott 4cf6396e4c Change a couple of screenshots which had screen in them now I've got rid of
screen on that box too :-).
2009-07-19 13:52:51 +00:00
Tiago Cunha 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.
2009-07-19 00:39:37 +00:00
Nicholas Marriott 19cb1fb592 Make it so using kill-pane to destroy the last pane in a window destroys the
window instead of being an error.
2009-07-18 11:07:14 +00:00
Nicholas Marriott 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.
2009-07-18 11:06:35 +00:00
Nicholas Marriott 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.
2009-07-18 11:06:09 +00:00
Nicholas Marriott 4192449112 Remove a duplicate key binding, and turn off autorepeat for up/down as it is
kind of annoying by default.
2009-07-18 11:05:45 +00:00
Nicholas Marriott 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.
2009-07-18 11:05:13 +00:00
Nicholas Marriott 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.
2009-07-17 18:35:55 +00:00
Tiago Cunha 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.
2009-07-17 18:32:54 +00:00
Nicholas Marriott 646632de1d Update TODO. 2009-07-17 18:05:06 +00:00
Nicholas Marriott 770ea563ee Changed the wrong thing here. 2009-07-17 15:56:46 +00:00
Nicholas Marriott 946affe60d Stupid cvsps. 2009-07-17 12:35:01 +00:00
Nicholas Marriott 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.
2009-07-17 12:12:54 +00:00
Nicholas Marriott fc17ce0150 Oops, it is always a good idea to get arguments the right way round. 2009-07-17 09:28:27 +00:00
Nicholas Marriott 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
2009-07-17 09:26:21 +00:00
Nicholas Marriott ac55534055 Remove some duplicate code that was causing the status line to be redrawn even
when it hadn't changed.
2009-07-17 07:46:08 +00:00
Nicholas Marriott 821de39b27 Fix arguments to switch-client. 2009-07-17 07:45:42 +00:00
Nicholas Marriott 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.
2009-07-17 07:45:08 +00:00
Nicholas Marriott 08d32a1522 Update TODO. 2009-07-16 07:35:41 +00:00
Nicholas Marriott 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.
2009-07-16 07:35:35 +00:00
Nicholas Marriott 6fe25a08d7 Improved NetBSD current-process detection from Roy Marples. 2009-07-15 17:53:15 +00:00
Nicholas Marriott 222b8e6743 Make status_message_set a variadic printf-like function. No functional change -
helpful for a couple of things coming soon.
2009-07-15 17:50:11 +00:00
Nicholas Marriott d6908dd9c2 Return -1 not NULL on error, pointed out by Roy Marples. 2009-07-15 17:46:09 +00:00
Nicholas Marriott 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.
2009-07-15 17:45:29 +00:00
Nicholas Marriott 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.
2009-07-15 17:45:09 +00:00
Nicholas Marriott 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.
2009-07-15 17:44:47 +00:00
Nicholas Marriott 6ebb1df8fe Add main-pane-height to the options list (was missed before). 2009-07-15 17:44:25 +00:00
Nicholas Marriott 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.
2009-07-15 17:44:06 +00:00
Nicholas Marriott 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.
2009-07-15 17:43:45 +00:00
Nicholas Marriott ad1945c278 Don't accept input to a window if it not visible. 2009-07-15 17:43:21 +00:00
Nicholas Marriott 82b45b460e The scroll region cannot be one line only, ignore attempts to make it so. 2009-07-15 17:43:02 +00:00