Commit Graph

5638 Commits

Author SHA1 Message Date
2f517111ef Solaris has no u_int32_t etc. 2009-08-20 12:49:18 +00:00
9311e4255e Didn't mean to commit this. 2009-08-20 12:39:21 +00:00
61c7bfc128 Also undef CTRL. 2009-08-20 12:38:37 +00:00
14eb6df45e Solaris defines some of these in termios.h so #ifndef them. 2009-08-20 12:27:58 +00:00
698e003fcd Solaris has no bzero(). 2009-08-20 12:25:17 +00:00
cc2c061289 Sync OpenBSD patchset 280:
Handle the device attributes (DA) escape sequence.
2009-08-20 11:54:58 +00:00
9d33b3f72a Sync OpenBSD patchset 279:
tweak previous;
2009-08-20 11:53:27 +00:00
0027aa3d1e Sync OpenBSD patchset 278:
Don't read beyond the edge of the screen when searching (dies with debug
enabled).
2009-08-20 11:52:39 +00:00
1292540bb5 Sync OpenBSD patchset 276:
Extend command-prompt with a -p option which is a comma-separated list of one
or more prompts to present in order.

The responses to the prompt are replaced in the template string: %% are
replaced in order, so the first prompt replaces the first %%, the second
replaces the second, and so on. In addition, %1 up to %9 are replaced with the
responses to the first the ninth prompts

The default template is "%1" so the response to the first prompt is processed
as a command.

Note that this changes the behaviour for %% so if there is only one prompt,
only the first %% will be replaced. Templates such as "neww -n '%%' 'ssh %%'"
should be changed to "neww -n '%1' 'ssh %1'".

From Tiago Cunha.
2009-08-20 11:51:20 +00:00
4631c07483 Sync OpenBSD patchset 275:
Instead of just checking for an empty buffer, which may not be the case if
there is unconsumed data, save the previous size and use it instead. This means
that activity monitoring should work in this (unlikely) event.

Also remove a debugging statement that no longer seems necessary.
2009-08-20 11:48:01 +00:00
d895d4a9f0 Sync OpenBSD patchset 274:
Whoops, getting the comparison the right way round is usually recommended.
2009-08-20 11:45:37 +00:00
d3da62d53a Sync OpenBSD patchset 273:
Move another expensive options test to after a cheaper timer check/update.
2009-08-20 11:44:18 +00:00
b644b17599 Sync OpenBSD patchset 272:
options_get_number() is relatively expensive and a check for dead panes happens
a lot more often than actually finding one, so instead of getting the option
for every check, get it for every dead window found.
2009-08-20 11:40:15 +00:00
36475f80e9 Sync OpenBSD patchset 271:
Now that pane targets (-t) are supported, switch some commands to use them
where it makes sense: clock-mode, copy-mode, scroll-mode, send-keys,
send-prefix.
2009-08-20 11:37:46 +00:00
52b02850ca Sync OpenBSD patchset 270:
Tag a few missed printf-like functions and fix a missing "%s".
2009-08-20 11:35:16 +00:00
7ca3d7ac8e Do not include vis.h directly, since it's OS-dependent, due to OpenBSD
patchsets 268, and 269.
2009-08-20 11:33:13 +00:00
3756fce553 Sync OpenBSD patchset 269:
Pass show-buffer output through vis(3) as well, and wrap it to the edge of the
terminal when used from the command line.
2009-08-20 11:30:24 +00:00
9386f640a5 Sync OpenBSD patchset 268:
Change list-buffers to run the preview of the buffer through vis(1).
2009-08-20 11:28:05 +00:00
bcfb4f2a07 Sync OpenBSD patchset 267:
Use the full screen width when printing output rather than one less.
2009-08-20 11:24:33 +00:00
aa7c0f1ce8 Sync OpenBSD patchset 266:
Nuke unnecessary assignment.
2009-08-20 11:23:36 +00:00
2a5f08c15a Sync OpenBSD patchset 265:
Add a "delete line" key when editing in the status line or the search up/down
prompt. C-u with emacs keys, d with vi.
2009-08-20 11:22:48 +00:00
70fc085862 Sync OpenBSD patchset 264:
Add (naive) searching and goto line in copy mode. Searching is C-r and C-s with
emacs keys, / and ? with vi; n repeats the search again with either key
set. All searching wraps the top/bottom. Goto line is g for both emacs and vi.

The search prompts don't have full line editing, just simple append and delete
characters.

Also sort the mode keys list in tmux.1.
2009-08-20 11:20:24 +00:00
234ad54b2c Nuke unused variable. 2009-08-20 10:48:25 +00:00
09cc530299 Solaris and AIX have no ttydefaults.h. 2009-08-20 05:34:58 +00:00
bf121f7c60 Handle the device attributes (DA) escape sequence. 2009-08-19 17:00:31 +00:00
c741f2f4a6 tweak previous; 2009-08-19 16:10:26 +00:00
966818c23d Call tcsetattr(). Not tested. 2009-08-19 16:06:45 +00:00
7c9f827bfe In yet another triumph of stupidity over common sense, the glibc
sys/ttydefaults.h is just a copy of the file from *BSD, taking no account of
the fact that their OWN termios.h uses entirely different indexes into the
array.

I know ttydefaults.h is not meant to be portable, but you'd think it would be
obvious to anyone that no file is better than a broken one...
2009-08-19 15:57:54 +00:00
55336657d4 Don't read beyond the edge of the screen when searching (dies with debug
enabled).
2009-08-19 14:46:56 +00:00
2a300c6661 Use cfsetispeed/cfsetospeed to set termios speed members. 2009-08-19 14:32:49 +00:00
c41aa49059 Use cfsetispeed/cfsetospeed to set termios speed members. 2009-08-19 14:32:15 +00:00
3f4418d84d Extend command-prompt with a -p option which is a comma-separated list of one
or more prompts to present in order.

The responses to the prompt are replaced in the template string: %% are
replaced in order, so the first prompt replaces the first %%, the second
replaces the second, and so on. In addition, %1 up to %9 are replaced with the
responses to the first the ninth prompts

The default template is "%1" so the response to the first prompt is processed
as a command.

Note that this changes the behaviour for %% so if there is only one prompt,
only the first %% will be replaced. Templates such as "neww -n '%%' 'ssh %%'"
should be changed to "neww -n '%1' 'ssh %1'".

From Tiago Cunha.
2009-08-19 10:39:50 +00:00
53570b1505 Make this match OpenBSD. 2009-08-19 09:28:10 +00:00
11f0f812c5 Didn't mean to commit this stuff. 2009-08-19 09:04:48 +00:00
620402a833 This is a better fix for OS X stupidity. 2009-08-19 09:00:06 +00:00
3f7e2589cd OS X stupid poll fix. 2009-08-19 08:36:45 +00:00
036de0c5e4 Instead of just checking for an empty buffer, which may not be the case if
there is unconsumed data, save the previous size and use it instead. This means
that activity monitoring should work in this (unlikely) event.

Also remove a debugging statement that no longer seems necessary.
2009-08-18 21:41:13 +00:00
c488e5e40d Whoops, getting the comparison the right way round is usually recommended. 2009-08-18 21:37:04 +00:00
8b7be5861e Move another expensive options test to after a cheaper timer check/update. 2009-08-18 21:18:20 +00:00
fa617467b1 options_get_number() is relatively expensive and a check for dead panes happens
a lot more often than actually finding one, so instead of getting the option
for every check, get it for every dead window found.
2009-08-18 21:14:24 +00:00
ed26a1d3bb Update. 2009-08-18 16:21:25 +00:00
145ba777e8 Now that pane targets (-t) are supported, switch some commands to use them
where it makes sense: clock-mode, copy-mode, scroll-mode, send-keys,
send-prefix.
2009-08-18 16:21:04 +00:00
dc6271cd79 Tag a few missed printf-like functions and fix a missing "%s". 2009-08-18 14:48:42 +00:00
003a2e6479 Pass show-buffer output through vis(3) as well, and wrap it to the edge of the
terminal when used from the command line.
2009-08-18 13:08:43 +00:00
840fff5e5e Change list-buffers to run the preview of the buffer through vis(1). 2009-08-18 12:26:37 +00:00
1c58b94141 Use the full screen width when printing output rather than one less. 2009-08-18 11:53:03 +00:00
406fc209ac Nuke unnecessary assignment. 2009-08-18 09:51:51 +00:00
feaf91ab93 Add a "delete line" key when editing in the status line or the search up/down
prompt. C-u with emacs keys, d with vi.
2009-08-18 07:23:43 +00:00
c828c2f366 Add (naive) searching and goto line in copy mode. Searching is C-r and C-s with
emacs keys, / and ? with vi; n repeats the search again with either key
set. All searching wraps the top/bottom. Goto line is g for both emacs and vi.

The search prompts don't have full line editing, just simple append and delete
characters.

Also sort the mode keys list in tmux.1.
2009-08-18 07:08:26 +00:00
ae1debbc92 Example from Han Boetes. 2009-08-16 21:55:30 +00:00