Merge remote-tracking branch 'tmux/master'

This commit is contained in:
Nicolas Viennot 2016-01-01 14:18:07 -05:00
commit a60da0db1e
6 changed files with 69 additions and 326 deletions

1
README
View File

@ -1 +0,0 @@
README.md

65
README Normal file
View File

@ -0,0 +1,65 @@
Welcome to tmux!
tmux is a "terminal multiplexer", it enables a number of terminals (or windows)
to be accessed and controlled from a single terminal. tmux is intended to be a
simple, modern, BSD-licensed alternative to programs such as GNU screen.
This release runs on OpenBSD, FreeBSD, NetBSD, Linux, OS X and Solaris.
tmux depends on libevent 2.x. Download it from:
http://www.monkey.org/~provos/libevent/
To build tmux from a release tarball, do:
$ ./configure && make
$ sudo make install
To get and build the latest from version control:
$ git clone https://github.com/tmux/tmux.git
$ cd tmux
$ sh autogen.sh
$ ./configure && make
For more information see http://git-scm.com. Patches should be sent by email to
the mailing list at tmux-users@googlegroups.com.
For documentation on using tmux, see the tmux.1 manpage. It can be viewed from
the source tree with:
$ nroff -mdoc tmux.1|less
Some common questions are answered in the FAQ file and a more extensive (but
slightly out of date) guide is available in the OpenBSD FAQ at
http://www.openbsd.org/faq/faq7.html#tmux. A rough todo list is in the TODO
file and some example configurations are in the examples directory.
A vim(1) syntax file is available at:
https://github.com/keith/tmux.vim
https://raw.githubusercontent.com/keith/tmux.vim/master/syntax/tmux.vim
For debugging, running tmux with -v or -vv will generate server and client log
files in the current directory.
tmux mailing lists are available. For general discussion and bug reports:
https://groups.google.com/forum/#!forum/tmux-users
And for Git commit emails:
https://groups.google.com/forum/#!forum/tmux-git
Bug reports, feature suggestions and especially code contributions are most
welcome. Please send by email to:
tmux-users@googlegroups.com
This file and the CHANGES, FAQ, SYNCING and TODO files are licensed under
the ISC license. Files under examples/ remain copyright their authors unless
otherwise stated in the file but permission has been received to distribute
them with tmux. All other files have a license and copyright notice at their
start.
-- Nicholas Marriott <nicholas.marriott@gmail.com>

View File

@ -85,12 +85,6 @@ cmd_select_pane_exec(struct cmd *self, struct cmd_q *cmdq)
return (CMD_RETURN_NORMAL);
}
server_unzoom_window(wp->window);
if (!window_pane_visible(wp)) {
cmdq_error(cmdq, "pane not visible");
return (CMD_RETURN_ERROR);
}
if (args_has(args, 'm') || args_has(args, 'M')) {
if (args_has(args, 'm') && !window_pane_visible(wp))
return (CMD_RETURN_NORMAL);

View File

@ -90,10 +90,9 @@ cmd_switch_client_exec(struct cmd *self, struct cmd_q *cmdq)
cmdq_error(cmdq, "can't find last session");
return (CMD_RETURN_ERROR);
}
} else {
if (cmdq->client == NULL)
return (CMD_RETURN_NORMAL);
s = state->tflag.s;
if (state->tflag.wl != NULL) {
wp = state->tflag.wp;
if (wp != NULL)

View File

@ -1,314 +0,0 @@
" Vim syntax file
" Language: tmux(1) configuration file
" Maintainer: Tiago Cunha <tcunha@users.sourceforge.net>
" Last Change: $Date: 2010-07-27 18:29:07 $
" License: This file is placed in the public domain.
"
" To install this file:
"
" - Drop the file in the syntax directory into runtimepath (such as
" ~/.vim/syntax/tmux.vim).
" - Make the filetype recognisable by adding the following to filetype.vim
" (~/.vim/filetype.vim):
"
" augroup filetypedetect
" au BufNewFile,BufRead .tmux.conf*,tmux.conf* setf tmux
" augroup END
"
" - Switch on syntax highlighting by adding "syntax enable" to .vimrc.
"
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
setlocal iskeyword+=-
syntax case match
syn keyword tmuxAction any current none
syn keyword tmuxBoolean off on
syn keyword tmuxCmds
\ attach
\ attach-session
\ bind
\ bind-key
\ break-pane
\ breakp
\ capture-pane
\ capturep
\ choose-buffer
\ choose-client
\ choose-session
\ choose-tree
\ choose-window
\ clear-history
\ clearhist
\ clock-mode
\ command-prompt
\ confirm
\ confirm-before
\ copy-mode
\ delete-buffer
\ deleteb
\ detach
\ detach-client
\ display
\ display-message
\ display-panes
\ displayp
\ find-window
\ findw
\ has
\ has-session
\ if
\ if-shell
\ info
\ join-pane
\ joinp
\ kill-pane
\ kill-server
\ kill-session
\ kill-window
\ killp
\ killw
\ last
\ last-pane
\ last-window
\ lastp
\ link-window
\ linkw
\ list-buffers
\ list-clients
\ list-commands
\ list-keys
\ list-panes
\ list-sessions
\ list-windows
\ load-buffer
\ loadb
\ lock
\ lock-client
\ lock-server
\ lock-session
\ lockc
\ locks
\ ls
\ lsb
\ lsc
\ lscm
\ lsk
\ lsp
\ lsw
\ move-pane
\ move-window
\ movep
\ movew
\ new
\ new-session
\ new-window
\ neww
\ next
\ next-layout
\ next-window
\ nextl
\ paste-buffer
\ pasteb
\ path
\ pipe-pane
\ pipep
\ prev
\ previous-layout
\ previous-window
\ prevl
\ refresh
\ refresh-client
\ rename
\ rename-session
\ rename-window
\ renamew
\ resize-pane
\ resizep
\ respawn-pane
\ respawn-window
\ respawnp
\ respawnw
\ rotate-window
\ rotatew
\ run
\ run-shell
\ save-buffer
\ saveb
\ select-layout
\ select-pane
\ select-window
\ selectl
\ selectp
\ selectw
\ send
\ send-keys
\ send-prefix
\ server-info
\ set
\ set-buffer
\ set-environment
\ set-option
\ set-window-option
\ setb
\ setenv
\ setw
\ show
\ show-buffer
\ show-environment
\ show-messages
\ show-options
\ show-window-options
\ showb
\ showenv
\ showmsgs
\ showw
\ source
\ source-file
\ split-window
\ splitw
\ start
\ start-server
\ suspend-client
\ suspendc
\ swap-pane
\ swap-window
\ swapp
\ swapw
\ switch-client
\ switchc
\ unbind
\ unbind-key
\ unlink-window
\ unlinkw
\ wait
\ wait-for
syn keyword tmuxOptsSet
\ assume-paste-time
\ base-index
\ bell-action
\ bell-on-alert
\ buffer-limit
\ default-command
\ default-shell
\ default-terminal
\ destroy-unattached
\ detach-on-destroy
\ display-panes-active-colour
\ display-panes-colour
\ display-panes-time
\ display-time
\ escape-time
\ exit-unattached
\ focus-events
\ history-file
\ history-limit
\ lock-after-time
\ lock-command
\ message-command-style
\ message-limit
\ message-style
\ mouse
\ mouse-utf8
\ 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-right-style
\ status-style
\ status-utf8
\ terminal-overrides
\ update-environment
\ visual-activity
\ visual-bell
\ visual-silence
\ word-separators
syn keyword tmuxOptsSetw
\ aggressive-resize
\ allow-rename
\ alternate-screen
\ automatic-rename
\ automatic-rename-format
\ clock-mode-colour
\ clock-mode-style
\ force-height
\ force-width
\ main-pane-height
\ main-pane-width
\ mode-keys
\ mode-style
\ monitor-activity
\ monitor-silence
\ other-pane-height
\ other-pane-width
\ pane-active-border-style
\ pane-base-index
\ pane-border-style
\ remain-on-exit
\ synchronize-panes
\ utf8
\ window-active-style
\ window-status-activity-style
\ window-status-bell-style
\ window-status-current-format
\ window-status-current-style
\ window-status-format
\ window-status-last-style
\ window-status-separator
\ window-status-style
\ window-style
\ wrap-search
\ xterm-keys
syn keyword tmuxTodo FIXME NOTE TODO XXX contained
syn match tmuxKey /\(C-\|M-\|\^\)\+\S\+/ display
syn match tmuxNumber /\d\+/ display
syn match tmuxOptions /\s-\a\+/ display
syn match tmuxVariable /\w\+=/ display
syn match tmuxVariableExpansion /\${\=\w\+}\=/ display
" Comments can span multiple lines, when the newline is escaped
" (with a single) backslash at the end.
syn region tmuxComment start=/#/ skip=/\\\@<!\\$/ end=/$/ contains=tmuxTodo
syn region tmuxString start=/"/ end=/"/ display oneline
syn region tmuxString start=/'/ end=/'/ display oneline
hi def link tmuxAction Boolean
hi def link tmuxBoolean Boolean
hi def link tmuxCmds Keyword
hi def link tmuxComment Comment
hi def link tmuxKey Special
hi def link tmuxNumber Number
hi def link tmuxOptions Identifier
hi def link tmuxOptsSet Function
hi def link tmuxOptsSetw Function
hi def link tmuxString String
hi def link tmuxTodo Todo
hi def link tmuxVariable Constant
hi def link tmuxVariableExpansion Constant
let b:current_syntax = "tmux"

View File

@ -94,10 +94,10 @@ screen_set_cursor_style(struct screen *s, u_int style)
/* Set screen cursor colour. */
void
screen_set_cursor_colour(struct screen *s, const char *colour_string)
screen_set_cursor_colour(struct screen *s, const char *colour)
{
free(s->ccolour);
s->ccolour = xstrdup(colour_string);
s->ccolour = xstrdup(colour);
}
/* Set screen title. */

2
tty.c
View File

@ -491,7 +491,7 @@ tty_update_mode(struct tty *tty, int mode, struct screen *s)
{
int changed;
if (s != NULL && strcmp(s->ccolour, tty->ccolour))
if (s != NULL && strcmp(s->ccolour, tty->ccolour) != 0)
tty_force_cursor_colour(tty, s->ccolour);
if (tty->flags & TTY_NOCURSOR)