aboutsummaryrefslogtreecommitdiff
path: root/window.c
Commit message (Collapse)AuthorAge
...
* Sync OpenBSD patchset 437:Tiago Cunha2009-10-23
| | | | | Only redraw the pane when changing mode, not the entire window.
* Sync OpenBSD patchset 417:Tiago Cunha2009-10-23
| | | | | | Stop updating the screen when not in output mode, stops copy mode getting confused.
* Sync OpenBSD patchset 387:Tiago Cunha2009-10-12
| | | | | | | | | | | | | Add a pipe-pane command to allow a pane to be piped to a shell command, for example: pipe-pane 'cat >~/out' No arguments stops outputing and closes the pipe; the -o flag toggles a pipe and on and off (useful for key bindings). Suggested by espie@.
* Sync OpenBSD patchset 381:Tiago Cunha2009-10-12
| | | | | | | | | Clean up by introducing a wrapper struct for mouse clicks rather than passing three u_chars around. As a side-effect this fixes incorrectly rejecting high cursor positions (because it was comparing them as signed char), reported by Tom Doherty.
* Sync OpenBSD patchset 376:Tiago Cunha2009-10-12
| | | | | Accept key and mouse input for keys in zombified windows if they are in a mode..
* Sync OpenBSD patchset 373:Tiago Cunha2009-10-11
| | | | | | | | New option, mouse-select-pane. If on, the mouse may be used to select the current pane. Suggested by sthen@ and also by someone else ages ago who I have forgotten.
* Sync OpenBSD patchset 371:Tiago Cunha2009-10-11
| | | | | | | | | | Add "grouped sessions" which have independent name, options, current window and so on but where the linked windows are synchronized (ie creating, killing windows and so on are mirrored between the sessions). A grouped session may be created by passing -t to new-session. Had this around for a while, tested by a couple of people.
* Sync OpenBSD patchset 367:Tiago Cunha2009-10-09
| | | | | | | Add a simple synchronize-panes window option: when set, all input to any pane that is part of the window is also sent to all other panes in the same window. Suggested by several, most recently Tomasz Pajor.
* Use __sun not __sun__ as Sun's CC doesn't define the latter.Nicholas Marriott2009-09-23
|
* Sync OpenBSD patchset 332:Tiago Cunha2009-09-20
| | | | | Regularise some fatal messages.
* Sync from OpenBSD:Nicholas Marriott2009-09-16
| | | | | | | | | | | == Rather than constructing an entire termios struct from ttydefaults.h, just let forkpty do it and then alter the bits that should be changed after fork. A little neater and more portable. == This should fix problems caused by glibc's broken ttydefaults.h file.
* Sync OpenBSD patchset 306:Tiago Cunha2009-09-02
| | | | | | If forking a login shell or if SHELL is otherwise not useful, set it to the default shell. Based on a diff from martynas@.
* 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 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 249:Tiago Cunha2009-08-14
| | | | | | When started as the shell, __progname contains a leading -, so hardcode "tmux" for socket path and log files, and strip it when working out the shell.
* 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 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 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 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 155:Tiago Cunha2009-07-22
| | | | | | Make some functions which return unused values void (mostly found by lint) and tweak a redundant expression in window_pane_set_mode.
* OpenSolaris ioctl(TIOCSWINSZ) appears to be broken and can return EINVAL hereNicholas Marriott2009-07-22
| | | | | | despite sx, sy and fd being fine (an fcntl on the fd succeeds). No problems on other platforms so ignore the error under #ifdef __sun__.
* Sync OpenBSD patchset 142:Tiago Cunha2009-07-20
| | | | | | | | | | | | | | | | | | | | | | | | Each window now has a tree of layout cells associated with it. In this tree, each node is either a horizontal or vertical cell containing a list of other cells running from left-to-right or top-to-bottom, or a leaf cell which is associated with a pane. The major functional changes are: - panes may now be split arbitrarily both horizontally (splitw -h, C-b %) and vertically (splitw -v, C-b "); - panes may be resized both horizontally and vertically (resizep -L/-R/-U/-D, bound to C-b left/right/up/down and C-b M-left/right/up/down); - layouts are now applied and then may be modified by resizing or splitting panes, rather than being fixed and reapplied when the window is resized or panes are added; - manual-vertical layout is no longer necessary, and active-only layout is gone (but may return in future); - the main-pane layouts now reduce the size of the main pane to fit all panes if possible. Thanks to all who tested.
* - New command display-message (alias display) to display a message in theTiago Cunha2009-07-17
| | | | | | | | 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.
* The man page says that kill-window removes the window entirely, unlinking itNicholas Marriott2009-07-15
| | | | | | | | from any sessions. In fact the implementation only affected the current session, making it the same as unlink-window but destroying the window if it was linked into only one session (unlinkw gives an error). Change the behaviour to match what it documented and was originally intended.
* Don't accept input to a window if it not visible.Nicholas Marriott2009-07-15
|
* Get rid of the PANE_HIDDEN flag in favour of a function, and moving theNicholas Marriott2009-07-15
| | | | | | | | | decision for whether or not a pane should be drawn out of the layout code and into the redraw code. This is needed for the new layout design, getting it in now to make that easier to work on.
* Support "alternate screen" mode (terminfo smcup/rmcup) typically used by fullNicholas Marriott2009-07-14
| | | | | | | | screen interactive programs to preserve the screen contents. When activated, it saves a copy of the visible grid and disables scrolling into and resizing out of the history; when deactivated the visible data is restored and the history reenabled.
* Fix $Id$.Nicholas Marriott2009-07-08
|
* Rename the global options variables to be shorter and to make session optionsNicholas Marriott2009-07-08
| | | | | | clear. No functional change, getting this out of the way to make later options changes easier.
* Change default_window_name to use window_default_command if the actual cmd isNicholas Marriott2009-07-02
| | | | | empty. From Josh Elsasser.
* Using -l to specify a login shell is non-POSIX and causes problems with shellsNicholas Marriott2009-07-01
| | | | | | that do not support it. Instead, set an empty default-command to invoke $SHELL with - prefixed to argv[0], and make this the default setting.
* More diff-to-OpenBSD reduction. Move a lot of compat stuff into compat.h.Nicholas Marriott2009-06-25
|
* Restore $Id$ and add script to do so.Nicholas Marriott2009-06-25
|
* Miscellaneous unused functions, including one which was basically aNicholas Marriott2009-06-25
| | | | | duplicate. Found by lint.
* Change find-window and monitor-content to use fnmatch(3). For convenience andNicholas Marriott2009-06-25
| | | | | compatibility, *s are implicitly added at the start and end of the pattern.
* Add a dedicated function to convert a line into a string and use it to ↵Nicholas Marriott2009-06-25
| | | | simplify the search window function.
* If a pane is "zombified" (remain-on-exit flag), don't continue to queue key andNicholas Marriott2009-06-25
| | | | | mouse input for it (otherwise they are processed after respawn).
* strdup the input to putenv to avoid in one case passing a string that is laterNicholas Marriott2009-06-25
| | | | | freed and in the other const strings.
* - New window option monitor-content to search for a string in a window, andTiago Cunha2009-05-19
| | | | | | | | | 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.
* Clean up manual layout code:Nicholas Marriott2009-05-18
| | | | | | | | | | | | - change the one layout function into two _refresh and _resize - create layout-manual.c for manual layout code - move the fit panes/update panes code from window.c to the new file as it is only used by manual layout now - move the resize pane code into layout-manual.c as well - get rid of the direct calls to fit/update and make them go through layout - rename a couple of variables This is mainly as a first step before reworking the manual layout code to see if anything breaks.
* putenv can be char *.Nicholas Marriott2009-05-15
|
* It is HAVE_PTY_H, also add a cast to shut gcc up.Nicholas Marriott2009-05-14
|
* Rename all feature flags to HAVE_* and move out of makefiles into a configureNicholas Marriott2009-05-13
| | | | | | | | | 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.
* Space trimmage mega-diff.Nicholas Marriott2009-05-04
|
* Adjust mouse for x offset.Nicholas Marriott2009-04-01
|
* Basic horizontal splitting and layout management. Still some redraw and otherNicholas Marriott2009-04-01
| | | | | | | | | | | issues - particularly, don't mix with manual pane resizing and be careful when viewing from multiple clients; generally cycling the layout a few times will fix most problems. Getting this in for testing while I think about how to deal with manual mode. Split window as normal and cycle the layouts with C-b space. Some of the layouts will work better when swap-pane comes along.
* break-pane command to split a pane off into a new window; bound to ! by default.Nicholas Marriott2009-03-07
|
* Doh. Set a message when pane is too small rather than dying...Nicholas Marriott2009-03-01
|
* Looking up argv[0] is expensive, so just use p_comm for the window name ↵Nicholas Marriott2009-02-13
| | | | which is good enough. Also increase name update time to 500 ms.