13 Commits
1.9 ... 1.9a

Author SHA1 Message Date
Thomas Adam
80d9964a30 Update CHANGES and configure.ac for 1.9a release 2014-02-22 20:55:59 +00:00
Thomas Adam
150ef86800 Merge branch 'obsd-master' 2014-02-22 20:48:44 +00:00
nicm
315d45a0eb Fix crash due to uninitialized lastwp member of layout_cell, reported by
Balazs Kezes.
2014-02-22 18:01:10 +00:00
Nicholas Marriott
2a412fad04 Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code 2014-02-22 17:36:17 +00:00
Nicholas Marriott
fe6f520054 FAQ about xterm-keys in emacs and vim, from Mark Oteiza. 2014-02-22 17:35:41 +00:00
nicm
c7f3599ebc Fix -fg/-bg/-style with 256 colour terminals. 2014-02-22 01:38:47 +00:00
Thomas Adam
b7589750a1 Correct Linux-specific manpage sections
Some of the man page locations on Linux differ to those on *BSD.  Noticed by
Christopher Meng.
2014-02-21 09:27:28 +00:00
Nicholas Marriott
c310212d28 Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code 2014-02-21 08:03:42 +00:00
Nicholas Marriott
94d99d5462 Put each command on its own line and remove duplicates, from Daniel Hahler. 2014-02-21 08:02:48 +00:00
Thomas Adam
9120df33ef dist: Call clean target before any other action
In case 'make dist' is invoked from a dirty tree which hasn't had its object
files cleaned up, clean out the tree first before tarring up the files for a
release.
2014-02-20 23:20:17 +00:00
Thomas Adam
1ab0745f8e Working on 1.10 2014-02-20 21:44:33 +00:00
Nicholas Marriott
d325104d10 Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code 2014-02-17 18:09:25 +00:00
Nicholas Marriott
3aadc9d665 Missing *. 2014-02-14 13:56:39 +00:00
11 changed files with 346 additions and 64 deletions

11
CHANGES
View File

@@ -1,3 +1,14 @@
CHANGES FROM 1.9 to 1.9a 22 February 2014
NOTE: This is a bug-fix release to address some important bugs which just
missed the 1.9 deadline, but were found afterwards.
Normal Changes
==============
* Fix crash due to uninitialized lastwp member of layout_cell
* Fix -fg/-bg/-style with 256 colour terminals.
CHANGES FROM 1.8 to 1.9, 20 February 2014 CHANGES FROM 1.8 to 1.9, 20 February 2014
NOTE: This release has bumped the tmux protocol version. It is therefore NOTE: This release has bumped the tmux protocol version. It is therefore

25
FAQ
View File

@@ -238,6 +238,31 @@ would be welcome.
vim users may also want to set the "ttyfast" option inside tmux. vim users may also want to set the "ttyfast" option inside tmux.
* How do I make ctrl and shift arrow keys work in emacs?
The terminal-init-screen function in term/screen.el is called for new frames,
but it doesn't configure any function keys.
If the tmux xterm-keys option is on, it is enough to define the same keys as
xterm. Add the following to init.el or .emacs to do this:
(defadvice terminal-init-screen
;; The advice is named `tmux', and is run before `terminal-init-screen' runs.
(before tmux activate)
;; Docstring. This describes the advice and is made available inside emacs;
;; for example when doing C-h f terminal-init-screen RET
"Apply xterm keymap, allowing use of keys passed through tmux."
;; This is the elisp code that is run before `terminal-init-screen'.
(if (getenv "TMUX")
(let ((map (copy-keymap xterm-function-map)))
(set-keymap-parent map (keymap-parent input-decode-map))
(set-keymap-parent input-decode-map map))))
And ensure .tmux.conf contains "set -g xterm-keys on".
Alternatively, the screen.el file can be copied to the load path and
customized.
* Why doesn't elinks set the window title inside tmux? * Why doesn't elinks set the window title inside tmux?
There isn't a way to detect if a terminal supports setting the window title, so There isn't a way to detect if a terminal supports setting the window title, so

View File

@@ -9,6 +9,7 @@ EXTRA_DIST = \
CHANGES FAQ README TODO COPYING examples compat \ CHANGES FAQ README TODO COPYING examples compat \
array.h compat.h tmux.h osdep-*.c mdoc2man.awk tmux.1 array.h compat.h tmux.h osdep-*.c mdoc2man.awk tmux.1
dist-hook: dist-hook:
make clean
grep "^#found_debug=" configure grep "^#found_debug=" configure
find $(distdir) -name .svn -type d|xargs rm -Rf find $(distdir) -name .svn -type d|xargs rm -Rf

2
TODO
View File

@@ -119,7 +119,7 @@
- miscellaneous - miscellaneous
* way to keep a job running just read its last line of output for #() * way to keep a job running just read its last line of output for #()
link panes into multiple windows * link panes into multiple windows
* live update: server started with -U connects to server, requests * live update: server started with -U connects to server, requests
sessions and windows, receives file descriptors sessions and windows, receives file descriptors
* there are inconsistencies in what we get from old shell and what * there are inconsistencies in what we get from old shell and what

View File

@@ -1,7 +1,7 @@
# $Id$ # $Id$
# Miscellaneous autofoo bullshit. # Miscellaneous autofoo bullshit.
AC_INIT(tmux, 1.9) AC_INIT(tmux, 1.9a)
AC_CONFIG_AUX_DIR(etc) AC_CONFIG_AUX_DIR(etc)
AM_INIT_AUTOMAKE([foreign subdir-objects]) AM_INIT_AUTOMAKE([foreign subdir-objects])

View File

@@ -31,59 +31,237 @@ syn keyword tmuxAction any current none
syn keyword tmuxBoolean off on syn keyword tmuxBoolean off on
syn keyword tmuxCmds syn keyword tmuxCmds
\ attach[-session] bind[-key] break-pane breakp capture-pane capturep \ attach[-session]
\ choose-buffer choose-client choose-list choose-session choose-tree \ bind[-key]
\ choose-window clear-history clearhist clock-mode command-prompt \ break-pane
\ confirm[-before] copy-mode delete-buffer deleteb detach[-client] \ breakp
\ display[-message] display-panes displayp find-window findw \ capture-pane
\ has[-session] if[-shell] join-pane joinp kill-pane killp kill-server \ capturep
\ kill-session kill-window killw last-pane lastp last[-window] \ choose-buffer
\ link-window linkw list-buffers lsb list-clients lsc \ choose-client
\ list-commands lscm list-keys lsk list-panes lsp list-sessions ls \ choose-list
\ list-windows lsw load-buffer loadb lock-client lockc lock[-server] \ choose-session
\ lock-session locks move-pane movep move-window movew new[-session] \ choose-tree
\ next-layout nextl next[-window] paste-buffer pasteb pipe-pane pipep \ choose-window
\ previous-layout prevl prev[ious-window] refresh[-client] \ clear-history
\ rename[-session] rename-window renamew resize-pane resizep \ clearhist
\ respawn-pane respawnp respawn-window respawnw rotate-window rotatew \ clock-mode
\ run[-shell] save-buffer saveb select-layout selectl \ command-prompt
\ select-pane selectp select-window selectw send[-keys] send-prefix \ confirm[-before]
\ server-info info set-buffer setb set-environment setenv set[-option] \ copy-mode
\ set-window-option setw show-buffer showb show-environment showenv \ delete-buffer
\ show-messages showmsgs show[-options] show-window-options showw \ deleteb
\ source[-file] split-window splitw start[-server] \ detach[-client]
\ suspend-client suspendc swap-pane swapp swap-window swapw \ display[-message]
\ switch-client switchc unbind[-key] unlink-window unlinkw wait[-for] \ display-panes
\ displayp
\ find-window
\ findw
\ has[-session]
\ if[-shell]
\ join-pane
\ joinp
\ kill-pane
\ killp
\ kill-server
\ kill-session
\ kill-window
\ killw
\ last-pane
\ lastp
\ last[-window]
\ link-window
\ linkw
\ list-buffers
\ lsb
\ list-clients
\ lsc
\ list-commands
\ lscm
\ list-keys
\ lsk
\ list-panes
\ lsp
\ list-sessions
\ ls
\ list-windows
\ lsw
\ load-buffer
\ loadb
\ lock-client
\ lockc
\ lock[-server]
\ lock-session
\ locks
\ move-pane
\ movep
\ move-window
\ movew
\ new[-session]
\ next-layout
\ nextl
\ next[-window]
\ paste-buffer
\ pasteb
\ pipe-pane
\ pipep
\ previous-layout
\ prevl
\ prev[ious-window]
\ refresh[-client]
\ rename[-session]
\ rename-window
\ renamew
\ resize-pane
\ resizep
\ respawn-pane
\ respawnp
\ respawn-window
\ respawnw
\ rotate-window
\ rotatew
\ run[-shell]
\ save-buffer
\ saveb
\ select-layout
\ selectl
\ select-pane
\ selectp
\ select-window
\ selectw
\ send[-keys]
\ send-prefix
\ server-info
\ info
\ set-buffer
\ setb
\ set-environment
\ setenv
\ set[-option]
\ set-window-option
\ setw
\ show-buffer
\ showb
\ show-environment
\ showenv
\ show-messages
\ showmsgs
\ show[-options]
\ show-window-options
\ showw
\ source[-file]
\ split-window
\ splitw
\ start[-server]
\ suspend-client
\ suspendc
\ swap-pane
\ swapp
\ swap-window
\ swapw
\ switch-client
\ switchc
\ unbind[-key]
\ unlink-window
\ unlinkw
\ wait[-for]
syn keyword tmuxOptsSet syn keyword tmuxOptsSet
\ buffer-limit escape-time exit-unattached exit-unattached focus-events \ assume-paste-time
\ quiet set-clipboard \ base-index
\ assume-paste-time base-index bell-action bell-on-alert default-command \ bell-action
\ default-shell default-terminal destroy-unattached detach-on-destroy \ bell-on-alert
\ display-panes-active-colour display-panes-colour display-panes-time \ buffer-limit
\ display-time history-limit lock-after-time lock-command lock-server \ default-command
\ message-command-style message-limit message-style mouse-resize-pane \ default-shell
\ mouse-select-pane mouse-select-window mouse-utf8 \ default-terminal
\ pane-active-border-style pane-border-style prefix prefix2 \ destroy-unattached
\ renumber-windows repeat-time set-remain-on-exit set-titles \ detach-on-destroy
\ set-titles-string status status-interval status-justify status-keys \ display-panes-active-colour
\ status-left status-left-length status-left-style status-position \ display-panes-colour
\ status-right status-right-length staus-right-style status-utf8 \ display-panes-time
\ terminal-overrides update-environment visual-activity visual-bell \ display-time
\ visual-content visual-silence word-separators \ escape-time
\ exit-unattached
\ focus-events
\ history-limit
\ lock-after-time
\ lock-command
\ lock-server
\ message-command-style
\ message-limit
\ message-style
\ mouse-resize-pane
\ mouse-select-pane
\ mouse-select-window
\ mouse-utf8
\ pane-active-border-style
\ pane-border-style
\ prefix
\ prefix2
\ quiet
\ renumber-windows
\ repeat-time
\ set-clipboard
\ set-remain-on-exit
\ set-titles
\ set-titles-string
\ status
\ status-interval
\ status-justify
\ status-keys
\ status-left
\ status-left-length
\ status-left-style
\ status-position
\ status-right
\ status-right-length
\ status-utf8
\ staus-right-style
\ terminal-overrides
\ update-environment
\ visual-activity
\ visual-bell
\ visual-content
\ visual-silence
\ word-separators
syn keyword tmuxOptsSetw syn keyword tmuxOptsSetw
\ aggressive-resize allow-rename alternate-screen automatic-rename \ aggressive-resize
\ c0-change-interval c0-change-trigger clock-mode-colour \ allow-rename
\ clock-mode-style force-height force-width force-height \ alternate-screen
\ force-width main-pane-height main-pane-width mode-keys \ automatic-rename
\ mode-mouse mode-style monitor-activity monitor-content monitor-silence \ c0-change-interval
\ other-pane-height other-pane-width pane-base-index remain-on-exit \ c0-change-trigger
\ synchronize-panes utf8 window-status-activity-style \ clock-mode-colour
\ window-status-bell-style window-status-content-style \ clock-mode-style
\ window-status-current-format window-status-current-style \ force-height
\ window-status-format window-status-last-style window-status-separator \ force-width
\ window-status-style wrap-search xterm-keys \ main-pane-height
\ main-pane-width
\ mode-keys
\ mode-mouse
\ mode-style
\ monitor-activity
\ monitor-content
\ monitor-silence
\ other-pane-height
\ other-pane-width
\ pane-base-index
\ remain-on-exit
\ synchronize-panes
\ utf8
\ window-status-activity-style
\ window-status-bell-style
\ window-status-content-style
\ window-status-current-format
\ window-status-current-style
\ window-status-format
\ window-status-last-style
\ window-status-separator
\ window-status-style
\ wrap-search
\ xterm-keys
syn keyword tmuxTodo FIXME NOTE TODO XXX contained syn keyword tmuxTodo FIXME NOTE TODO XXX contained

51
examples/xterm-keys.vim Normal file
View File

@@ -0,0 +1,51 @@
" tmux.vim - Set xterm input codes passed by tmux
" Author: Mark Oteiza
" License: Public domain
" Description: Simple plugin that assigns some xterm(1)-style keys to escape
" sequences passed by tmux when "xterm-keys" is set to "on". Inspired by an
" example given by Chris Johnsen at:
" https://stackoverflow.com/a/15471820
"
" Documentation: help:xterm-modifier-keys man:tmux(1)
if exists("g:loaded_tmux") || &cp
finish
endif
let g:loaded_tmux = 1
function! s:SetXtermCapabilities()
set ttymouse=sgr
execute "set <xUp>=\e[1;*A"
execute "set <xDown>=\e[1;*B"
execute "set <xRight>=\e[1;*C"
execute "set <xLeft>=\e[1;*D"
execute "set <xHome>=\e[1;*H"
execute "set <xEnd>=\e[1;*F"
execute "set <Insert>=\e[2;*~"
execute "set <Delete>=\e[3;*~"
execute "set <PageUp>=\e[5;*~"
execute "set <PageDown>=\e[6;*~"
execute "set <xF1>=\e[1;*P"
execute "set <xF2>=\e[1;*Q"
execute "set <xF3>=\e[1;*R"
execute "set <xF4>=\e[1;*S"
execute "set <F5>=\e[15;*~"
execute "set <F6>=\e[17;*~"
execute "set <F7>=\e[18;*~"
execute "set <F8>=\e[19;*~"
execute "set <F9>=\e[20;*~"
execute "set <F10>=\e[21;*~"
execute "set <F11>=\e[23;*~"
execute "set <F12>=\e[24;*~"
execute "set t_kP=^[[5;*~"
execute "set t_kN=^[[6;*~"
endfunction
if exists('$TMUX')
call s:SetXtermCapabilities()

View File

@@ -53,6 +53,7 @@ layout_create_cell(struct layout_cell *lcparent)
lc->yoff = UINT_MAX; lc->yoff = UINT_MAX;
lc->wp = NULL; lc->wp = NULL;
lc->lastwp = NULL;
return (lc); return (lc);
} }

26
style.c
View File

@@ -203,8 +203,14 @@ style_apply(struct grid_cell *gc, struct options *oo, const char *name)
memcpy(gc, &grid_default_cell, sizeof *gc); memcpy(gc, &grid_default_cell, sizeof *gc);
gcp = options_get_style(oo, name); gcp = options_get_style(oo, name);
colour_set_fg(gc, gcp->fg); if (gcp->flags & GRID_FLAG_FG256)
colour_set_bg(gc, gcp->bg); colour_set_fg(gc, gcp->fg | 0x100);
else
colour_set_fg(gc, gcp->fg);
if (gcp->flags & GRID_FLAG_BG256)
colour_set_bg(gc, gcp->bg | 0x100);
else
colour_set_bg(gc, gcp->bg);
gc->attr |= gcp->attr; gc->attr |= gcp->attr;
} }
@@ -215,10 +221,18 @@ style_apply_update(struct grid_cell *gc, struct options *oo, const char *name)
struct grid_cell *gcp; struct grid_cell *gcp;
gcp = options_get_style(oo, name); gcp = options_get_style(oo, name);
if (gcp->fg != 8) if (gcp->fg != 8) {
colour_set_fg(gc, gcp->fg); if (gcp->flags & GRID_FLAG_FG256)
if (gcp->bg != 8) colour_set_fg(gc, gcp->fg | 0x100);
colour_set_bg(gc, gcp->bg); else
colour_set_fg(gc, gcp->fg);
}
if (gcp->bg != 8) {
if (gcp->flags & GRID_FLAG_BG256)
colour_set_bg(gc, gcp->bg | 0x100);
else
colour_set_bg(gc, gcp->bg);
}
if (gcp->attr != 0) if (gcp->attr != 0)
gc->attr |= gcp->attr; gc->attr |= gcp->attr;
} }

10
tmux.1
View File

@@ -61,7 +61,7 @@ A window occupies the entire screen
and may be split into rectangular panes, and may be split into rectangular panes,
each of which is a separate pseudo terminal each of which is a separate pseudo terminal
(the (the
.Xr pty 4 .Xr pty 7
manual page documents the technical details of pseudo terminals). manual page documents the technical details of pseudo terminals).
Any number of Any number of
.Nm .Nm
@@ -359,7 +359,7 @@ or
These specify the client, session, window or pane which a command should affect. These specify the client, session, window or pane which a command should affect.
.Ar target-client .Ar target-client
is the name of the is the name of the
.Xr pty 4 .Xr pty 7
file to which the client is connected, for example either of file to which the client is connected, for example either of
.Pa /dev/ttyp1 .Pa /dev/ttyp1
or or
@@ -710,7 +710,7 @@ and
specify the size of the initial window (80 by 24 if not given). specify the size of the initial window (80 by 24 if not given).
.Pp .Pp
If run from a terminal, any If run from a terminal, any
.Xr termios 4 .Xr termios 3
special characters are saved and used for new windows in the new session. special characters are saved and used for new windows in the new session.
.Pp .Pp
The The
@@ -1144,7 +1144,7 @@ interactively from a list.
After a client is chosen, After a client is chosen,
.Ql %% .Ql %%
is replaced by the client is replaced by the client
.Xr pty 4 .Xr pty 7
path in path in
.Ar template .Ar template
and the result executed as a command. and the result executed as a command.
@@ -3852,6 +3852,6 @@ bind-key / command-prompt "split-window 'exec man %%'"
bind-key S command-prompt "new-window -n %1 'ssh %1'" bind-key S command-prompt "new-window -n %1 'ssh %1'"
.Ed .Ed
.Sh SEE ALSO .Sh SEE ALSO
.Xr pty 4 .Xr pty 7
.Sh AUTHORS .Sh AUTHORS
.An Nicholas Marriott Aq Mt nicm@users.sourceforge.net .An Nicholas Marriott Aq Mt nicm@users.sourceforge.net

View File

@@ -407,8 +407,9 @@ window_pane_active_set(struct window_pane *wp, struct window_pane *nextwp)
* Previously active pane, if any, must not be the same as the source * Previously active pane, if any, must not be the same as the source
* pane. * pane.
*/ */
if (nextwp->layout_cell->parent != NULL) { lc = nextwp->layout_cell->parent;
lastwp = nextwp->layout_cell->parent->lastwp; if (lc != NULL && lc->lastwp != NULL) {
lastwp = lc->lastwp;
if (lastwp != wp && window_pane_visible(lastwp)) if (lastwp != wp && window_pane_visible(lastwp))
return (lastwp); return (lastwp);
} }