Tiago Cunha
3266fb5441
Sync OpenBSD patchset 332:
...
Regularise some fatal messages.
2009-09-20 22:11:27 +00:00
Tiago Cunha
0ec1ce005c
Sync OpenBSD patchset 322:
...
Permit options such as status-bg to be configured using the entire 256 colour
palette by setting "colour0" to "colour255".
2009-09-11 14:13:52 +00:00
Tiago Cunha
c272de7cba
Sync OpenBSD patchset 318:
...
Give each paste buffer a size member instead of requiring them to be
zero-terminated.
2009-09-07 23:48:54 +00:00
Tiago Cunha
5edc465802
Sync OpenBSD patchset 317:
...
Permit embedded colour and attributes in status-left and status-right using new
#[] special characters, for example #[fg=red,bg=blue,blink].
2009-09-07 23:37:48 +00:00
Tiago Cunha
3b944fe7e8
Sync OpenBSD patchset 307:
...
Add a transpose-chars command in edit mode (C-t in emacs mode only). From Kalle
Olavi Niemitalo.
2009-09-02 22:45:17 +00:00
Tiago Cunha
ce5c441f0f
Sync OpenBSD patchset 304:
...
Use "Password:" with no space for password prompts and don't display a *s for
the password, like pretty much everything else. From martynas@ with minor
tweaks by me.
2009-09-02 00:55:49 +00:00
Tiago Cunha
ed3535db8a
Sync OpenBSD patchset 302:
...
Add a new display-panes command, with two options (display-panes-colour and
display-panes-time), which displays a visual indication of the number of each
pane.
2009-08-31 22:30:15 +00:00
Tiago Cunha
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
Tiago Cunha
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
Tiago Cunha
646d6a929c
Sync OpenBSD patchset 261:
...
Switch the prompt code to return an empty string when the user enters no
response and reserve NULL for an explicit cancel. Change all callbacks to treat
them the same so no functional change.
Also add cancel key bindings to emacs mode which were missing.
2009-08-16 19:29:24 +00:00
Tiago Cunha
167a8c9edc
Sync OpenBSD patchset 229:
...
Options to set the colours and attributes for status-left/-right. From Thomas
Adam, thanks.
2009-08-09 17:40:17 +00:00
Tiago Cunha
88b83be07b
Sync OpenBSD patchset 220:
...
If colours are not supported by the terminal, try to emulate a coloured
background by setting or clearing the reverse attribute.
This makes a few applications which don't use the reverse attribute themselves
a little happier, and allows the status, message and mode options to have
default attributes and fg/bg options that work as expected when set as reverse.
2009-08-09 16:50:57 +00:00
Tiago Cunha
09c6432854
Sync OpenBSD patchset 207:
...
Plug some memory leaks.
2009-07-30 21:14:04 +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
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
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
6a97901691
Sync OpenBSD patchset 153:
...
Remove a couple of unused functions and fix a type ("FALLTHOUGH"), found by
lint.
2009-07-22 17:31:20 +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
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
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
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
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
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
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.
2009-07-14 06:39:25 +00:00
Nicholas Marriott
9f0653386b
$Id$.
2009-07-01 23:06:32 +00:00
Nicholas Marriott
de2ea2d178
Status line fixes: don't truncate status-right now the length calculation is
...
done for UTF-8, limit to the maximum length correctly when printing, and always
print a space even if the left string is longer than the width available.
2009-06-26 15:34:12 +00:00
Nicholas Marriott
bb459beb03
Whitespace and more syncing.
2009-06-25 16:34:50 +00:00
Nicholas Marriott
a5830b9603
Restore $Id$ and add script to do so.
2009-06-25 16:21:32 +00:00
Nicholas Marriott
418128bebc
If the prompt is hidden or a password is sent with -U, zero it before freeing
...
it.
2009-06-25 15:55:34 +00:00
Nicholas Marriott
28bcf774e5
New session option, status-utf8, to control the interpretation of top-bit-set
...
characters in status-left and status-right (if on, they are treated as UTF-8;
otherwise passed through).
2009-06-25 15:48:25 +00:00
Nicholas Marriott
1e06ec41dc
Add a UTF-8 aware string length function and make UTF-8 in
...
status-left/status-right work properly. At the moment any top-bit-set
characters are assumed to be UTF-8: a status-utf8 option to configure this will
come shortly.
2009-06-25 15:47:07 +00:00
Nicholas Marriott
17a6c01d58
Don't show real character under cursor when hidden. Doh.
2009-05-29 05:40:56 +00:00
Tiago Cunha
80af85a102
- New window option monitor-content to search for a string in a window, and
...
highlight the status line if it matches.
- To make this possible, the function cmd_find_window_search from
cmd-find-window.c had to be moved to window.c and renamed window_pane_search.
- While there use three new functions in server.c to check for bell, activity,
and content, to avoid too much nesting.
2009-05-19 13:32:55 +00:00
Nicholas Marriott
6805217783
Move dist.mk to tools/.
2009-05-17 18:15:41 +00:00
Nicholas Marriott
cba338ac13
Keys in status line (p in vi mode, M-y in emacs) to paste the first line of the upper paste buffer. Suggested by Dan Colish.
2009-05-14 19:36:56 +00:00
Nicholas Marriott
f1bd3807ae
Everything supported has working vsnprintf.
2009-05-13 23:29:45 +00:00
Nicholas Marriott
c8cf438d44
Rename all feature flags to HAVE_* and move out of makefiles into a configure
...
script which must be run before building.
Still two makefiles but they are a hell of a lot simpler.
HAVE_* also will make it easier to move to $buildsystem if necessary later.
2009-05-13 23:27:00 +00:00
Nicholas Marriott
5d1b6888dc
Convert hidden flag to a full flags word for the status line and add a flag to
...
accept after only one key. Use this so don't need to press enter after y/n for
confirm-before.
2009-04-27 17:27:36 +00:00
Tiago Cunha
c80ad456cc
Avoid using the prompt history when the server is locked, and prevent any
...
input entered from being added to the client's prompt history. From nicm.
2009-04-27 13:56:51 +00:00
Nicholas Marriott
95c8c049f5
Redo mode keys slightly more cleanly and apply them to command prompt editing. vi or emacs mode is controlled by the session option status-keys.
2009-02-13 21:39:45 +00:00
Nicholas Marriott
0450b4a5d4
Move status prompt/message init and teardown into status.c.
2009-02-13 18:57:55 +00:00
Nicholas Marriott
03d531ebc6
Move sx,sy into tty rather than client.
2009-02-11 17:50:36 +00:00
Nicholas Marriott
b37399304f
Don't redraw status line unless it has actually changed. Stops extraneous
...
updates between clock/#() changes and doesn't require manual status-interval 0
when no updates are occuring.
2009-02-10 00:18:06 +00:00
Tiago Cunha
804beb9266
Support commands with right parenthesis. From nicm and me.
2009-02-01 18:14:49 +00:00
Nicholas Marriott
882316ad6a
Set colour of window entry in status line based on window options.
2009-01-30 00:24:49 +00:00
Tiago Cunha
2bb499c8af
Support #(command) in status-left, and status-right.
2009-01-29 23:35:14 +00:00
Nicholas Marriott
c6bd9e2063
Allow status, mode and message attributes to be changed by three new options: status-attr, mode-attr, message-attr. A comma-separataed list is accepted containing: bright, dim, underscore, blink, reverse, hidden, italics, for example: set -g status-attr bright,blink
...
From Josh Elsasser, thanks!
2009-01-27 20:22:33 +00:00
Nicholas Marriott
6146cab3bd
Use reverse so status line etc works in terminals w/o colour.
2009-01-23 20:49:01 +00:00
Nicholas Marriott
2afa8ebc02
Fix various silly problems with status line off.
2009-01-19 20:14:55 +00:00
Nicholas Marriott
94471aab82
Use reverse rather than background which doesn't show up when terminal doesn't
...
support colours.
2009-01-19 19:01:11 +00:00
Nicholas Marriott
0e197b417a
Tidy a few warnings.
2009-01-17 18:47:37 +00:00
Nicholas Marriott
5aa3098bb6
Support #S #H in status-left/right.
2009-01-15 23:42:21 +00:00
Nicholas Marriott
b4ac8c1342
Multiple window splitting.
2009-01-14 19:29:32 +00:00
Nicholas Marriott
7cd3cf0ead
Make the window pane code handle panes of different sizes, and add a -l and -p arguments to split-window to specify the new window size in lines or as a percentage.
2009-01-12 18:22:47 +00:00
Nicholas Marriott
162bacdcd9
Window splitting. Two vertical panes fixed 50% each. This is a huge diff, still a couple of bugs (notably heap corruption somewhere causing segfault on exit).
2009-01-11 23:31:46 +00:00
Nicholas Marriott
e3feb067a5
Server locking. set-password and lock-server commands, plus automatic locking.
2009-01-11 00:48:42 +00:00
Nicholas Marriott
a1b43faa43
Trim spaces.
2009-01-10 01:51:22 +00:00
Nicholas Marriott
622d4def22
Give up the farce of caring about any keys aside from the ones in the screen termcap and the ones termcap doesn't handle that we hardcode manually.
2009-01-08 22:28:02 +00:00
Nicholas Marriott
4924d8e1e2
+comment.
2009-01-07 22:29:33 +00:00
Nicholas Marriott
0314e767e1
Stray debug message.
2009-01-06 18:33:32 +00:00
Nicholas Marriott
4af8db90e8
Complete option names as well.
2009-01-06 17:04:56 +00:00
Nicholas Marriott
9cddd796ff
Prompt history.
2009-01-06 15:37:15 +00:00
Nicholas Marriott
7a82e86827
Make window options work the same was as session options, add mode-fg/mode-bg options, force -g for global on set/show/setw/showw/
2008-12-08 16:19:51 +00:00
Nicholas Marriott
d0342f4a04
Ability to show window title on status line.
2008-12-05 20:04:06 +00:00
Nicholas Marriott
46f5e42145
Keep stack of previous windows.
...
Check for op (orig_pair) for default colours.
2008-11-16 10:10:26 +00:00
Nicholas Marriott
b0d8393c05
Clear status bar cell.
2008-09-29 17:47:12 +00:00
Nicholas Marriott
62457bce0b
Trim.
2008-09-26 06:45:28 +00:00
Nicholas Marriott
44b368e220
time.h
2008-09-25 20:33:53 +00:00
Nicholas Marriott
efe557313a
Internal screen data rewrite for better 256 colour/UTF-8 support.
2008-09-25 20:08:57 +00:00
Nicholas Marriott
6674197e85
Fix bold/non-bold mismatch in 256 colour mode by adding an extra 8 bits (ick) onto the attributes and using two of them to mark the fg and bg as 256 colours when necessary. If only it was 255 colours we would have one value for default and wouln't need this :-/.
2008-09-08 22:03:56 +00:00
Nicholas Marriott
4235ddb4e8
Initial 256 colour support, lightly tested.
2008-09-08 17:40:51 +00:00
Nicholas Marriott
33aa931541
Support OS X by moving to gettimeofday(2) and adding poll compat from OpenSSH.
2008-08-28 17:45:30 +00:00
Nicholas Marriott
9043fe891a
Fix scrolling.
2008-06-27 17:32:24 +00:00
Nicholas Marriott
b69f4a3312
Split internal status-colour into status-fg/status-bg options and lose workarounds in set-option stuff.
2008-06-23 22:12:29 +00:00
Nicholas Marriott
e704d6aee2
IRIX fixes, sort of partly work.
2008-06-23 21:54:48 +00:00
Nicholas Marriott
91f3165b2d
IRIX fixes thanks to Elias Pipping.
2008-06-23 16:58:49 +00:00
Nicholas Marriott
c24d849fa4
Split options into a table to allow abbreviations.
2008-06-23 07:41:21 +00:00
Nicholas Marriott
e70e9513a8
Simple tab completion of option names in command prompt.
2008-06-21 14:11:39 +00:00
Nicholas Marriott
ead089ece6
Use a fake cursor to avoid problems with real one when activity happens in window.
2008-06-19 22:51:27 +00:00
Nicholas Marriott
73d1558ed0
status-lines -> status, prefix-key -> prefix
2008-06-19 22:04:02 +00:00
Nicholas Marriott
471e37659f
Handle empty strings as escape.
2008-06-19 20:53:04 +00:00
Nicholas Marriott
6d9eaa6440
No space after prompt.
2008-06-19 20:48:48 +00:00
Nicholas Marriott
c3b7a49cc1
Editable prompt. Not used for anything yet. More to come.
2008-06-19 19:40:35 +00:00
Nicholas Marriott
9ef5bdc7c0
Show status messages without blocking the server.
2008-06-19 18:27:55 +00:00
Nicholas Marriott
99df48d70f
Trimify.
2008-06-18 22:21:51 +00:00
Nicholas Marriott
f9dedfccca
Fix a couple of bugs. Handle 0 width properly (w/o overflow), and draw left < in the right place.
2008-06-18 17:28:17 +00:00
Nicholas Marriott
2d3ea8b5b4
Display <> for more windows and highlight if activity.
2008-06-18 17:14:02 +00:00
Nicholas Marriott
ee32d19432
Scroll status line to show windows off-screen.
2008-06-18 16:34:07 +00:00
Nicholas Marriott
557b6b86b0
Add a couple of extra option types, and implement show-options command.
2008-06-15 08:01:54 +00:00
Nicholas Marriott
0f403474aa
New window options: force-width and force-height. This will force a window to
...
an arbitrary width and height (0 for the default unlimited). This is neat for
emacs which doesn't have a sensible way to force hard wrapping at 80
columns. Also, don't try to be clever and use clr_eol when redrawing the
whole screen, it causes trouble since the redraw functions are used to draw
the blank areas too.
2008-06-14 16:47:20 +00:00
Nicholas Marriott
d51f075a4e
Use a socketpair to synchronise server startup.
2008-06-07 07:27:28 +00:00
Nicholas Marriott
713bad063a
Make status-interval actually changeable.
2008-06-07 06:13:21 +00:00
Nicholas Marriott
6a187bb8d3
Some Linux fixes; some code tidying. Don't redraw status bar so often.
2008-06-06 17:20:30 +00:00
Nicholas Marriott
14b9512546
Add activity monitoring, also invert items on taskbar which have activity.
2008-06-04 16:46:23 +00:00
Nicholas Marriott
811e75da52
Status bar left and right strings (set with status-left and status-right), and automatic update (at interval set by status-interval).
2008-06-04 05:40:35 +00:00