Merge branch 'obsd-master'

pull/746/head
Thomas Adam 2017-01-25 16:01:13 +00:00
commit 21d8f77a0d
2 changed files with 4 additions and 94 deletions

34
tmux.1
View File

@ -1146,14 +1146,6 @@ Commands in copy mode may be prefaced by an optional repeat count.
With vi key bindings, a prefix is entered using the number keys; with
emacs, the Alt (meta) key and a number begins prefix entry.
.Pp
Mode key bindings are defined in two tables:
.Em vi-choice
and
.Em emacs-choice
for keys used when choosing from lists (such as produced by the
.Ic choose-window
command).
.Pp
The synopsis for the
.Ic copy-mode
command is:
@ -2142,7 +2134,6 @@ Commands related to key bindings are as follows:
.Bl -tag -width Ds
.It Xo Ic bind-key
.Op Fl nr
.Op Fl t Ar mode-table
.Op Fl T Ar key-table
.Ar key Ar command Op Ar arguments
.Xc
@ -2191,18 +2182,10 @@ flag indicates this key may repeat, see the
.Ic repeat-time
option.
.Pp
If
.Fl t
is present,
.Ar key
is bound in
.Ar mode-table .
.Pp
To view the default bindings and possible commands, see the
.Ic list-keys
command.
.It Xo Ic list-keys
.Op Fl t Ar mode-table
.Op Fl T Ar key-table
.Xc
.D1 (alias: Ic lsk )
@ -2214,15 +2197,6 @@ With
.Fl T
only
.Ar key-table .
.Pp
With
.Fl t ,
the key bindings in
.Ar mode-table
are listed; this may be one of:
.Em vi-choice
or
.Em emacs-choice .
.It Xo Ic send-keys
.Op Fl lMRX
.Op Fl N Ar repeat-count
@ -2267,17 +2241,15 @@ Send the prefix key, or with
the secondary prefix key, to a window as if it was pressed.
.It Xo Ic unbind-key
.Op Fl an
.Op Fl t Ar mode-table
.Op Fl T Ar key-table
.Ar key
.Xc
.D1 (alias: Ic unbind )
Unbind the command bound to
.Ar key .
.Fl n ,
.Fl T
.Fl n
and
.Fl t
.Fl T
are the same as for
.Ic bind-key .
If
@ -2502,7 +2474,7 @@ interactive menu when required.
.It Ic terminal-overrides[] Ar string
Allow terminal descriptions read using
.Xr terminfo 5
to be overriden.
to be overridden.
Each entry is a colon-separated string made up of a terminal type pattern
(matched using
.Xr fnmatch 3 )

64
tmux.h
View File

@ -473,58 +473,10 @@ struct msg_stderr_data {
char data[BUFSIZ];
};
/* Mode key commands. */
enum mode_key_cmd {
MODEKEY_NONE,
MODEKEY_OTHER,
/* Menu (choice) keys. */
MODEKEYCHOICE_BACKSPACE,
MODEKEYCHOICE_BOTTOMLINE,
MODEKEYCHOICE_CANCEL,
MODEKEYCHOICE_CHOOSE,
MODEKEYCHOICE_DOWN,
MODEKEYCHOICE_ENDOFLIST,
MODEKEYCHOICE_PAGEDOWN,
MODEKEYCHOICE_PAGEUP,
MODEKEYCHOICE_SCROLLDOWN,
MODEKEYCHOICE_SCROLLUP,
MODEKEYCHOICE_STARTNUMBERPREFIX,
MODEKEYCHOICE_STARTOFLIST,
MODEKEYCHOICE_TOPLINE,
MODEKEYCHOICE_TREE_COLLAPSE,
MODEKEYCHOICE_TREE_COLLAPSE_ALL,
MODEKEYCHOICE_TREE_EXPAND,
MODEKEYCHOICE_TREE_EXPAND_ALL,
MODEKEYCHOICE_TREE_TOGGLE,
MODEKEYCHOICE_UP,
};
/* Data required while mode keys are in use. */
struct mode_key_data {
struct mode_key_tree *tree;
};
/* Mode keys. */
#define MODEKEY_EMACS 0
#define MODEKEY_VI 1
/* Binding between a key and a command. */
struct mode_key_binding {
key_code key;
enum mode_key_cmd cmd;
RB_ENTRY(mode_key_binding) entry;
};
RB_HEAD(mode_key_tree, mode_key_binding);
/* Named mode key table description. */
struct mode_key_entry;
struct mode_key_table {
const char *name;
const struct mode_key_cmdstr *cmdstr;
struct mode_key_tree *tree;
const struct mode_key_entry *table; /* default entries */
};
/* Modes. */
#define MODE_CURSOR 0x1
#define MODE_INSERT 0x2
@ -1582,20 +1534,6 @@ void printflike(4, 5) hooks_run(struct hooks *, struct client *,
void printflike(4, 5) hooks_insert(struct hooks *, struct cmdq_item *,
struct cmd_find_state *, const char *, ...);
/* mode-key.c */
extern struct mode_key_tree mode_key_tree_vi_choice;
extern struct mode_key_tree mode_key_tree_emacs_choice;
int mode_key_cmp(struct mode_key_binding *, struct mode_key_binding *);
RB_PROTOTYPE(mode_key_tree, mode_key_binding, entry, mode_key_cmp);
const char *mode_key_tostring(const struct mode_key_cmdstr *,
enum mode_key_cmd);
enum mode_key_cmd mode_key_fromstring(const struct mode_key_cmdstr *,
const char *);
const struct mode_key_table *mode_key_findtable(const char *);
void mode_key_init_trees(void);
void mode_key_init(struct mode_key_data *, struct mode_key_tree *);
enum mode_key_cmd mode_key_lookup(struct mode_key_data *, key_code);
/* notify.c */
void notify_input(struct window_pane *, struct evbuffer *);
void notify_client(const char *, struct client *);