Commit Graph

5741 Commits

Author SHA1 Message Date
Nicholas Marriott 55d8c01c33 Calculate the space available for the prompt buffer and the cursor position
correctly, and make it work when the screen is not wide enough.

Noticed by Kalle Olavi Niemitalo.
2009-07-26 21:13:47 +00:00
Nicholas Marriott 6b3b852ebc Go to the next if the current best process is replaced, don't keep comparing it
with itself. Also fix process name comparison.
2009-07-26 19:42:26 +00:00
Nicholas Marriott 21130b0c49 Add a couple of items, and wrap lines. 2009-07-26 15:58:40 +00:00
Nicholas Marriott 34a82e7629 Make all messages sent between the client and server fixed size.
This is the first of two changes to make the protocol more resilient and less
sensitive to other changes in the code, particularly with commands. The client
now packs argv into a buffer and sends it to the server for parsing, rather
than doing it itself and sending the parsed command data.

As a side-effect this also removes a lot of now-unused command marshalling
code.

Mixing a server without this change and a client with or vice versa will cause
tmux to hang or crash, please ensure that tmux is entirely killed before
upgrading.
2009-07-26 12:58:44 +00:00
Tiago Cunha a5ad186547 Sync OpenBSD patchset 180:
Set the active pane when respawning a window - fixes problems when respawning
a window with multiple panes.
2009-07-25 09:04:54 +00:00
Tiago Cunha 5e7a48a865 Sync OpenBSD patchset 179:
Use the full range of ACS line drawing characters to draw pane borders,
including intersections.
2009-07-25 09:03:33 +00:00
Tiago Cunha 2386fa2355 Sync OpenBSD patchset 178:
cmd_find_index should return -2 on error.
2009-07-25 08:59:38 +00:00
Tiago Cunha 723f363c07 Sync OpenBSD patchset 177:
Simplify screen redrawing by drawing the border and background together rather
than border separately, and consolidating all the drawing characters into one
string.
2009-07-25 08:58:19 +00:00
Tiago Cunha a98dbb67b9 Sync OpenBSD patchset 176:
Accept lowercase c- and m- prefix as well as C- and M-.
2009-07-25 08:53:48 +00:00
Tiago Cunha 28cf7dc39e Sync OpenBSD patchset 175:
Permit commands to be bound to key presses without the prefix key first. The
new -n flag to bind-key and unbind-key sets or removes these bindings, and
list-key shows them in []s.
2009-07-25 08:52:04 +00:00
Tiago Cunha 744ccb7cc9 Sync OpenBSD patchset 174:
up-pane and down-pane no longer auto-repeat; update the description of
repeat-time accordingly. ok nicm@

if you prefer old behaviour;

bind -r Up up-pane
bind -r Down down-pane
2009-07-25 08:39:39 +00:00
Nicholas Marriott db584544f4 Add some more bits. 2009-07-25 00:12:24 +00:00
Nicholas Marriott f4718dcdf2 +another couple of items. 2009-07-25 00:00:33 +00:00
Nicholas Marriott 4ec1b5d4e2 +. 2009-07-24 22:59:06 +00:00
Nicholas Marriott 2bb89bc5bc Set the active pane when respawning a window - fixes problems when respawning a
window with multiple panes.
2009-07-24 19:35:33 +00:00
Nicholas Marriott 6e0626d3af Screenshot with more ACS love. 2009-07-24 19:30:51 +00:00
Nicholas Marriott dd51dd14af Add. 2009-07-24 19:30:05 +00:00
Nicholas Marriott 133173850c Use the full range of ACS line drawing characters to draw pane borders,
including intersections.
2009-07-24 19:14:38 +00:00
Nicholas Marriott c6dac5c3c9 cmd_find_index should return -2 on error. 2009-07-24 18:46:40 +00:00
Nicholas Marriott 029599c02c Simplify screen redrawing by drawing the border and background together rather
than border separately, and consolidating all the drawing characters into one
string.
2009-07-24 16:21:42 +00:00
Nicholas Marriott 1d1ea681f0 Accept lowercase c- and m- prefix as well as C- and M-. 2009-07-24 14:57:22 +00:00
Nicholas Marriott 5a1a106637 Permit commands to be bound to key presses without the prefix key first. The
new -n flag to bind-key and unbind-key sets or removes these bindings, and
list-key shows them in []s.
2009-07-24 14:52:47 +00:00
Stuart Henderson ce4eb6559e up-pane and down-pane no longer auto-repeat; update the description of
repeat-time accordingly. ok nicm@

if you prefer old behaviour;

bind -r Up up-pane
bind -r Down down-pane
2009-07-24 14:50:24 +00:00
Tiago Cunha 7cd412dc57 Sync OpenBSD patchset 173:
None of the server message functions return anything but 0, so make them all
void.

Also remove a leftover variable in client.c.
2009-07-23 23:47:23 +00:00
Tiago Cunha 1870b96578 Sync OpenBSD patchset 172:
Tidy client message return slightly: convert flags into an enum, and merge
error string into struct client_ctx as well.
2009-07-23 23:42:59 +00:00
Tiago Cunha 2e4df706f6 Sync OpenBSD patchset 171:
Redraw after starting selection to correctly remove any existing selection.
2009-07-23 23:37:14 +00:00
Tiago Cunha 1141acfd4c Revert previous per OpenBSD's patchset 170. 2009-07-23 23:35:10 +00:00
Tiago Cunha 53c1b32e02 Sync OpenBSD patchset 169:
C-d is delete as well in emacs mode.
2009-07-23 23:29:53 +00:00
Nicholas Marriott 4a04b498db None of the server message functions return anything but 0, so make them all
void.

Also remove a leftover variable in client.c.
2009-07-23 21:19:11 +00:00
Nicholas Marriott 16e017d5a6 Tidy client message return slightly: convert flags into an enum, and merge
error string into struct client_ctx as well.
2009-07-23 20:24:27 +00:00
Nicholas Marriott ba84ddcf8e Redraw after starting selection to correctly remove any existing selection. 2009-07-23 17:03:47 +00:00
Nicholas Marriott 895171478f Revert r1.5, I don't like it, new sessions should start off identically - with
the defaults.
2009-07-23 15:47:56 +00:00
Nicholas Marriott e0d1954840 C-d is delete as well in emacs mode. 2009-07-23 13:44:02 +00:00
Tiago Cunha f2451c1e29 Sync OpenBSD patchset 168:
Both of cmdclient and curclient CAN be NULL - if the command is executed from
the configuration file. In this case, attach-session can't do much, and
new-session should just assume -d.
2009-07-23 13:25:27 +00:00
Tiago Cunha a551ff2b1b Sync OpenBSD patchset 167:
If there is a current session, use its default path and working directory for
the initial window when creating a new session.
2009-07-23 13:19:12 +00:00
Tiago Cunha 7174c76bf0 Sync OpenBSD patchset 166:
Pass a set of flags into client_init rather than just a start_server
variable. Only one flag now but more to come later.
2009-07-23 13:15:41 +00:00
Tiago Cunha 6708ad19c5 Sync OpenBSD patchset 165:
window_add_pane cannot fail, so remove the unused cause argument and don't
bother to check for a NULL return.
2009-07-23 13:10:38 +00:00
Tiago Cunha fb0301f8b8 Sync OpenBSD patchset 164:
Tidy the target parsing code a bit and correct the behaviour so that as before
a string with no colon as a target window is first looked up as a window then
as a session, noted by Iain Morgan.

Also attempt to clarify the description of the target specification in the man
page.
2009-07-23 13:06:31 +00:00
Tiago Cunha c84145751a Sync OpenBSD patchset 164:
tty_write is relatively short and the only function left in tty-write.c so
move it into tty.c.
2009-07-23 12:57:45 +00:00
Tiago Cunha b72f9bea43 Sync OpenBSD patchset 162:
More tty code tidying: move the saved cursor/region position (from before the
screen was updated) out of struct screen and into struct tty_ctx.
2009-07-23 12:48:18 +00:00
Tiago Cunha 9c6fa90857 Sync OpenBSD patchset 160:
enum tty_cmd is only used as an index into the array of command function
pointers, so remove it and use the function pointers directly to represent
themselves.
2009-07-23 12:38:01 +00:00
Nicholas Marriott 96a7cf1e6a Both of cmdclient and curclient CAN be NULL - if the command is executed from
the configuration file. In this case, attach-session can't do much, and
new-session should just assume -d.
2009-07-23 12:33:48 +00:00
Nicholas Marriott 05b511f96a If there is a current session, use its default path and working directory for
the initial window when creating a new session.
2009-07-22 22:47:43 +00:00
Nicholas Marriott bb14c36a27 Pass a set of flags into client_init rather than just a start_server
variable. Only one flag now but more to come later.
2009-07-22 21:58:56 +00:00
Nicholas Marriott 5ee84436c8 window_add_pane cannot fail, so remove the unused cause argument and don't
bother to check for a NULL return.
2009-07-22 21:34:36 +00:00
Nicholas Marriott f7df0bac96 Tidy the target parsing code a bit and correct the behaviour so that as before
a string with no colon as a target window is first looked up as a window then
as a session, noted by Iain Morgan.

Also attempt to clarify the description of the target specification in the man
page.
2009-07-22 21:23:29 +00:00
Nicholas Marriott 83d1f2b480 Some more TODO list items that are done. 2009-07-22 21:10:45 +00:00
Nicholas Marriott 19aae6dbd8 Add a couple of notes so I don't forget. 2009-07-22 21:02:07 +00:00
Nicholas Marriott dd4a3b24fc tty_write is relatively short and the only function left in tty-write.c so move
it into tty.c.
2009-07-22 20:56:58 +00:00
Nicholas Marriott ddad0be5f7 More tty code tidying: move the saved cursor/region position (from before the
screen was updated) out of struct screen and into struct tty_ctx.
2009-07-22 20:53:38 +00:00