aboutsummaryrefslogtreecommitdiff
path: root/tmux.h
Commit message (Collapse)AuthorAge
...
* That was the wrong fix. MSG_ERROR should set the error and the client shouldNicholas Marriott2009-09-02
| | | | | | | use the error and exit on MSG_EXIT (it was being handled in the default case). Undo the last change, move the errstr check into the MSG_EXIT case, and add a comment.
* Set exittype for error exit as well as the error string.Nicholas Marriott2009-09-02
|
* Sync OpenBSD patchset 305:Tiago Cunha2009-09-02
| | | | | | | | | | | | | | When using tmux as a login shell, there is currently no way to specify a shell to be used as a login shell inside tmux, so add a default-shell session option. This sets the shell invoked as a login shell when the default-command option is empty. The default option value is whichever of $SHELL, getpwuid(getuid())'s pw_shell or /bin/sh is valid first. Based on a diff from martynas@, changed by me to be a session option rather than a window option.
* Sync OpenBSD patchset 302:Tiago Cunha2009-08-31
| | | | | | | 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.
* Sync OpenBSD patchset 294:Tiago Cunha2009-08-25
| | | | | | | | | | | | | Add a choose-client command and extend choose-{session,window} to accept a template. After a choice is made, %% (or %1) in the template is replaced by the name of the session, window or client suitable for -t and the result executed as a command. So, for example, "choose-window "killw -t '%%'"" will kill the selected window. The defaults if no template is given are (as now) select-window for choose-window, switch-client for choose-session, and detach-client for choose-client (now bound to D).
* Sync OpenBSD patchset 293:Tiago Cunha2009-08-25
| | | | | gcc2 doesn't understand attributes on function pointers.
* Sync OpenBSD patchset 290:Tiago Cunha2009-08-24
| | | | | | | When using source-file, run the commands in the context of the source-file command rather than with no context. This makes things like attach work from a file.
* Sync OpenBSD patchset 289:Tiago Cunha2009-08-24
| | | | | | The cursession member in struct cmd_ctx is always either curclient->session or NULL when curclient is also NULL, so just eliminate it.
* Sync OpenBSD patchset 276:Tiago Cunha2009-08-20
| | | | | | | | | | | | | | | | | | | | 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.
* Sync OpenBSD patchset 275:Tiago Cunha2009-08-20
| | | | | | | | | 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.
* Sync OpenBSD patchset 270:Tiago Cunha2009-08-20
| | | | | Tag a few missed printf-like functions and fix a missing "%s".
* Sync OpenBSD patchset 265:Tiago Cunha2009-08-20
| | | | | | 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.
* Sync OpenBSD patchset 264:Tiago Cunha2009-08-20
| | | | | | | | | | | | 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.
* Didn't mean to commit this stuff.Nicholas Marriott2009-08-19
|
* This is a better fix for OS X stupidity.Nicholas Marriott2009-08-19
|
* Sync OpenBSD patchset 260:Tiago Cunha2009-08-16
| | | | | | | | | vi(1)-style half page scroll in copy and scroll modes. Move the vi full page scroll key to C-b instead of C-u and use C-u/C-d for half page scrolling with vi keys. In emacs mode, half page scrolling is bound to M-Up and M-Down. Suggested by merdely (about a year ago :-)).
* Sync OpenBSD patchset 257:Tiago Cunha2009-08-16
| | | | | | Add a base-index session option to specify the first index checked when looking for an index for a new window.
* Sync OpenBSD patchset 254:Tiago Cunha2009-08-16
| | | | | | | When creating a new session from the command-line where there is an external terminal, copy the termios(4) special characters and use them for new windows created in the new session. Suggested by Theo.
* Sync OpenBSD patchset 250:Tiago Cunha2009-08-14
| | | | | | | | | A tty context must not be modified as it may be reused to update multiple clients, so make it const. Also fix an actual modification which caused a hang when a session was connected to multiple terminals at least one of which was missing ich/ich1.
* Sync OpenBSD patchset 246:Tiago Cunha2009-08-14
| | | | | | | | | | | Have the client pass its stdin fd to the server when identifying itself and have the server use that rather than reopening the tty. If the fd isn't given, use the old behaviour (so no need for a version change). This allows tmux to be used as the shell, so also change so that when working out the command to execute if default-command is empty (the default), tmux will try not execute itself.
* Sync OpenBSD patchset 245:Tiago Cunha2009-08-14
| | | | | Add a TTY_OPENED flag and tidy a little.
* Sync OpenBSD patchset 244:Tiago Cunha2009-08-14
| | | | | | Drop the no_stop argument to tty_close and tty_free in favour of a flag in the tty struct.
* Adjust imsg changes to the portable version due to OpenBSD patchset 243.Tiago Cunha2009-08-14
|
* Sync OpenBSD patchset 243:Tiago Cunha2009-08-14
| | | | | | | | | | | | | | | | | | | Switch tmux to use imsg. This is the last major change to make the client-server protocol more resilient and make the protocol versioning work properly. In future, the only things requiring a protocol version bump will be changes in the message structs, and (when both client and server have this change) mixing different versions should nicely report an error message. As a side effect this also makes the code tidier, fixes a problem with the way errors reported during server startup were handled, and supports fd passing (which will be used in future). Looked over by eric@, thanks. Please note that mixing a client with this change with an older server or vice versa may cause tmux to crash or hang - tmux should be completely exited before upgrading.
* Sync from OpenBSD:Nicholas Marriott2009-08-11
| | | | | | | Add flags for 1+2 and 2 arguments to the generic target code, use it for cmd-set-environment/option/window-option and remove the generic options parsing.
* Sync OpenBSD patchset 231:Tiago Cunha2009-08-09
| | | | | | | | | | | | | | | | | Infrastructure and commands to manage the environment for processes started within tmux. There is a global environment, copied from the external environment when the server is started and each session has an (initially empty) session environment which overrides it. New commands set-environment and show-environment manipulate or display the environments. A new session option, update-environment, is a space-separated list of variables which are updated from the external environment into the session environment every time a new session is created - the default is DISPLAY.
* Sync OpenBSD patchset 227:Tiago Cunha2009-08-09
| | | | | | | Add a flags member to the grid_line struct and use it to differentiate lines wrapped at the screen edge from those terminated by a newline. Then use this when copying to combine wrapped lines together into one.
* Sync OpenBSD patchset 226:Tiago Cunha2009-08-09
| | | | | | | | | | | | | | Change the way the grid is stored, previously it was: - a two-dimensional array of cells; - a two-dimensional array of utf8 data; - an array of line lengths. Now it is a single array of a new struct grid_line each of which represents a line and contains the length and an array of cells and an array of utf8 data. This will make it easier to add additional per-line members, such as flags.
* Sync OpenBSD patchset 225:Tiago Cunha2009-08-09
| | | | | | | | | | | | | If there is an error in the configuration file, don't just exit(1) as this can cause the client to hang. Instead, send the error message, then mark the client as bad and start a normal shutdown so the server exits once the error is written. This also allows some code duplicating daemon(3) to be trimmed and logging to begin earlier. Prompted by Theo noticing the behaviour on error wasn't documented.
* Sync OpenBSD patchset 223:Tiago Cunha2009-08-09
| | | | | | | | Using the alternative screen (smcup/rmcup) should also preserve the current colours and attributes. Found thanks to a report from Taylor Venable. While here also nuke a couple of extra blank lines.
* Sync OpenBSD patchset 219:Tiago Cunha2009-08-09
| | | | | | Add a -a flag to set-option and set-window-option to append to an existing string value, useful for terminal-overrides.
* Sync OpenBSD patchset 211:Tiago Cunha2009-08-09
| | | | | | | | | | Add a terminal-overrides session option allowing individual terminfo(5) entries to be overridden. The 88col/256col checks are now moved into the default setting and out of the code. Also remove a couple of old workarounds for xterm and rxvt which are no longer necessary (tmux can emulate them if missing).
* Sync OpenBSD patchset 202:Tiago Cunha2009-07-30
| | | | | | | | | | | | There aren't many client message types or code to handle them so get rid of the lookup table and use a switch, merge the tiny handler functions into it, and move the whole lot to client.c. Also change client_msg_dispatch to consume as many messages as possible and move the call to it to the right place so it checks for signals afterwards. Prompted by suggestions from eric@.
* Sync OpenBSD patchset 200:Tiago Cunha2009-07-30
| | | | | | | | | | | | | | | | Merge pane number into the target specification for pane commands. Instead of using -p index, a target pane is now addressed with the normal -t window form but suffixed with a period and a pane index, for example :0.2 or mysess:mywin.1. An unadorned number such as -t 1 is tried as a pane index in the current window, if that fails the same rules are followed as for a target window and the current pane in that window used. As a side-effect this now means that swap-pane can swap panes between different windows. Note that this changes the syntax of the break-pane, clear-history, kill-pane, resize-pane, select-pane and swap-pane commands.
* Sync OpenBSD patchset 196:Tiago Cunha2009-07-30
| | | | | | Rename struct hdrtype to msgtype which is a better name and can be used even when struct hdr disappears.
* Sync OpenBSD patchset 194:Tiago Cunha2009-07-28
| | | | | | Final pieces of mode key rebinding: bind-key and unbind-key now accept a -t argument to modify a table.
* Sync OpenBSD patchset 192:Tiago Cunha2009-07-28
| | | | | | | | 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).
* Sync OpenBSD patchset 191:Tiago Cunha2009-07-28
| | | | | | If select-layout is not given an argument, reapply the last layout used in the window, if any.
* Sync OpenBSD patchset 190:Tiago Cunha2009-07-28
| | | | | | Remove an unused entry in the mode keys command enum and rename MODEKEYCOPY_QUIT to _CANCEL to match the others.
* Sync OpenBSD patchset 189:Tiago Cunha2009-07-28
| | | | | | | | | 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.
* Sync OpenBSD patchset 188:Tiago Cunha2009-07-28
| | | | | Get rid of empty mode_key_free function.
* Sync OpenBSD patchset 187:Tiago Cunha2009-07-28
| | | | | | | | Add a key to delete to end of line at the prompt (^K in emacs mode, C/D in vi). From Kalle Olavi Niemitalo.
* Sync OpenBSD patchset 184:Tiago Cunha2009-07-28
| | | | | | | | 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.
* Sync OpenBSD patchset 181:Tiago Cunha2009-07-28
| | | | | | | | | | | | | | | | | 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.
* Sync OpenBSD patchset 175:Tiago Cunha2009-07-25
| | | | | | | 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.
* Sync OpenBSD patchset 172:Tiago Cunha2009-07-23
| | | | | | Tidy client message return slightly: convert flags into an enum, and merge error string into struct client_ctx as well.
* Sync OpenBSD patchset 168:Tiago Cunha2009-07-23
| | | | | | | 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.
* Sync OpenBSD patchset 165:Tiago Cunha2009-07-23
| | | | | | window_add_pane cannot fail, so remove the unused cause argument and don't bother to check for a NULL return.
* Sync OpenBSD patchset 164:Tiago Cunha2009-07-23
| | | | | | tty_write is relatively short and the only function left in tty-write.c so move it into tty.c.
* Sync OpenBSD patchset 162:Tiago Cunha2009-07-23
| | | | | | 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.