Commit Graph

9121 Commits

Author SHA1 Message Date
Nicholas Marriott
c1d6d7ac6b Rename struct hdrtype to msgtype which is a better name and can be used even
when struct hdr disappears.
2009-07-29 14:17:26 +00:00
Nicholas Marriott
d3c461097b Taking account of the "s, 22 not 24 is the maximum length of #T in status-right
to prevent the date being cut off.
2009-07-29 05:36:53 +00:00
Tiago Cunha
522fc94d12 Sync OpenBSD patchset 194:
Final pieces of mode key rebinding: bind-key and unbind-key now accept a -t
argument to modify a table.
2009-07-28 23:19:06 +00:00
Tiago Cunha
deaba44835 Sync OpenBSD patchset 193:
Accept and print "Enter" and "Escape" for keys rather than C-m and C-[.
2009-07-28 23:13:00 +00:00
Tiago Cunha
de7483a114 Sync OpenBSD patchset 192:
Next step towards customisable mode keys: build each default table of keys
into a named tree on start and use that for lookups. Also add command to string
translation tables and modify list-keys to show the mode key bindings (new
-t argument).
2009-07-28 23:11:18 +00:00
Tiago Cunha
d9dcc5ed44 Sync OpenBSD patchset 191:
If select-layout is not given an argument, reapply the last layout used in the
window, if any.
2009-07-28 23:04:29 +00:00
Tiago Cunha
1c73e75982 Sync OpenBSD patchset 190:
Remove an unused entry in the mode keys command enum and rename
MODEKEYCOPY_QUIT to _CANCEL to match the others.
2009-07-28 22:58:20 +00:00
Tiago Cunha
920b9c5872 Sync OpenBSD patchset 189:
Change mode key bindings from big switches into a set of tables. Rather than
lumping them all together, split editing keys from those used in choice/more
mode and those for copy/scroll mode.

Tidier and clearer, and the first step towards customisable mode keys.
2009-07-28 22:55:59 +00:00
Tiago Cunha
1880b83c37 Sync OpenBSD patchset 188:
Get rid of empty mode_key_free function.
2009-07-28 22:49:26 +00:00
Tiago Cunha
46cb0de347 Sync OpenBSD patchset 187:
Add a key to delete to end of line at the prompt (^K in emacs mode, C/D in
vi).

From Kalle Olavi Niemitalo.
2009-07-28 22:44:38 +00:00
Tiago Cunha
7562781c9d Sync OpenBSD patchset 186:
Draw UTF-8 characters under the selection correctly.
2009-07-28 22:41:38 +00:00
Tiago Cunha
2a146852ef Sync OpenBSD patchset 185:
Change previous-word behavior to move to the beginning of the word (matches
emacs and vi). From Kalle Olavi Niemitalo.
2009-07-28 22:39:29 +00:00
Tiago Cunha
361801aaaa Sync OpenBSD patchset 184:
Detect backspace by looking at termios VERASE and translate it into \177
(which matches screen's behaviour if not its termcap/terminfo entry). The
terminfo kbs cap is often wrong or missing so it can't be used, and just
assuming \177 may be wrong.
2009-07-28 22:37:02 +00:00
Tiago Cunha
2aa4d47312 Sync OpenBSD patchset 183:
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-28 22:32:15 +00:00
Tiago Cunha
2dda197980 Make similar changes to the OS-dependent code for FreeBSD, and NetBSD in
accordance to OpenBSD patchset 182.
2009-07-28 22:28:11 +00:00
Tiago Cunha
6043d9cf89 Sync OpenBSD patchset 182:
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-28 22:26:13 +00:00
Tiago Cunha
a3fc9dee32 Add PASS_MAX for glibc. 2009-07-28 22:17:10 +00:00
Tiago Cunha
d637cb33da Sync OpenBSD patchset 181:
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-28 22:12:16 +00:00
Nicholas Marriott
f5c0695605 This stuff is done. 2009-07-28 18:51:10 +00:00
Nicholas Marriott
f596be9950 Final pieces of mode key rebinding: bind-key and unbind-key now accept a -t
argument to modify a table.
2009-07-28 17:05:10 +00:00
Nicholas Marriott
9e5d585ba4 Accept and print "Enter" and "Escape" for keys rather than C-m and C-[. 2009-07-28 09:18:01 +00:00
Nicholas Marriott
86785004ba Next step towards customisable mode keys: build each default table of keys into
a named tree on start and use that for lookups. Also add command to string
translation tables and modify list-keys to show the the mode key bindings (new
-t argument).
2009-07-28 07:03:32 +00:00
Nicholas Marriott
2da4864483 If select-layout is not given an argument, repply the last layout used in the
window, if any.
2009-07-28 06:48:44 +00:00
Nicholas Marriott
309b76fb32 Remove an unused entry in the mode keys command enum and rename
MODEKEYCOPY_QUIT to _CANCEL to match the others.
2009-07-27 20:36:13 +00:00
Nicholas Marriott
d95274c5f2 Change mode key bindings from big switches into a set of tables. Rather than
lumping them all together, split editing keys from those used in choice/more
mode and those for copy/scroll mode.

Tidier and clearer, and the first step towards customisable mode keys.
2009-07-27 19:29:35 +00:00
Nicholas Marriott
13e29dd7b5 Get rid of empty mode_key_free function. 2009-07-27 18:51:46 +00:00
Nicholas Marriott
ad0aad21d5 Add a key to delete to end of line at the prompt (^K in emacs mode, C/D in vi).
From Kalle Olavi Niemitalo.
2009-07-27 12:11:11 +00:00
Nicholas Marriott
fc65da1eed Draw UTF-8 characters under the selection correctly. 2009-07-27 11:33:21 +00:00
Nicholas Marriott
584eda8339 Change previous-word behavior to move to the beginning of the word (matches
emacs and vi). From Kalle Olavi Niemitalo.
2009-07-27 07:42:45 +00:00
Nicholas Marriott
639fbe0392 Detect backspace by looking at termios VERASE and translate it into \177 (which
matches screen's behaviour if not its termcap/terminfo entry). The terminfo kbs
cap is often wrong or missing so it can't be used, and just assuming \177 may
be wrong.
2009-07-26 21:42:08 +00:00
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