aboutsummaryrefslogtreecommitdiff
path: root/window.c
Commit message (Collapse)AuthorAge
* 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.
* Reset name when clearing mode.Nicholas Marriott2009-02-12
|
* Don't try to change the window name unless the pid of the process chosen hasNicholas Marriott2009-02-09
| | | | | | | changed. Reduces CPU use. osdep-* stuff is a bit horrible now but there we go :-/.
* Continue process if suspended.Nicholas Marriott2009-02-08
|
* * Better support for at least the most common variant of mouse input: parse ↵Nicholas Marriott2009-01-28
| | | | | | | it and adjust for different panes. Also support mouse in window/session choice mode. * Bring back the fancy window titles with session/window names: it is easy to work around problems with elinks (see FAQ).
* Be more clever about picking window name.Nicholas Marriott2009-01-26
|
* Better error messages for fork.Nicholas Marriott2009-01-23
|
* Bring back -p and -l to splitw to specify height as % or nlines.Nicholas Marriott2009-01-21
|
* Try to change the window title to match the command running it in. This is doneNicholas Marriott2009-01-20
| | | | | | | | | | | | | by reading argv[0] from the process group leader of the group that owns the tty (tcgetpgrp()). This can't be done portably so some OS-dependent code is introduced (ugh); OpenBSD, FreeBSD and Linux are supported at the moment. A new window flag, automatic-rename, is available: if this is set to off, the window name is not changed. Specifying a name with the new-window, new-session or rename-window commands will automatically set this flag to off for the window in question. To disable it entirely set the option to off globally (setw -g automatic-rename off).
* -a flags to next/previous window.Nicholas Marriott2009-01-18
|
* Multiple window splitting.Nicholas Marriott2009-01-14
|
* kill-pane command.Nicholas Marriott2009-01-13
|
* Make the window pane code handle panes of different sizes, and add a -l and ↵Nicholas Marriott2009-01-12
| | | | -p arguments to split-window to specify the new window size in lines or as a percentage.
* Window splitting. Two vertical panes fixed 50% each. This is a huge diff, ↵Nicholas Marriott2009-01-11
| | | | still a couple of bugs (notably heap corruption somewhere causing segfault on exit).
* Pick up cwd from environment,.Nicholas Marriott2009-01-10
|
* Change server-info format.Nicholas Marriott2009-01-10
|
* Make window options work the same was as session options, add ↵Nicholas Marriott2008-12-08
| | | | mode-fg/mode-bg options, force -g for global on set/show/setw/showw/
* Keep stack of previous windows.Nicholas Marriott2008-11-16
| | | | | Check for op (orig_pair) for default colours.
* Trim.Nicholas Marriott2008-09-26
|
* Rename some functions.Nicholas Marriott2008-09-10
|