mirror of
https://github.com/tmux/tmux.git
synced 2025-01-07 16:28:48 +00:00
Move word-separators to be a session rather than window option, from Ben
Boeckel.
This commit is contained in:
parent
7c9bc377a3
commit
fd25d35868
@ -421,6 +421,11 @@ const struct options_table_entry session_options_table[] = {
|
|||||||
.default_num = 0
|
.default_num = 0
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{ .name = "word-separators",
|
||||||
|
.type = OPTIONS_TABLE_STRING,
|
||||||
|
.default_str = " -_@"
|
||||||
|
},
|
||||||
|
|
||||||
{ .name = NULL }
|
{ .name = NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -615,11 +620,6 @@ const struct options_table_entry window_options_table[] = {
|
|||||||
.default_str = "#I:#W#F"
|
.default_str = "#I:#W#F"
|
||||||
},
|
},
|
||||||
|
|
||||||
{ .name = "word-separators",
|
|
||||||
.type = OPTIONS_TABLE_STRING,
|
|
||||||
.default_str = " -_@"
|
|
||||||
},
|
|
||||||
|
|
||||||
{ .name = "xterm-keys",
|
{ .name = "xterm-keys",
|
||||||
.type = OPTIONS_TABLE_FLAG,
|
.type = OPTIONS_TABLE_FLAG,
|
||||||
.default_num = 0
|
.default_num = 0
|
||||||
|
15
tmux.1
15
tmux.1
@ -837,7 +837,7 @@ and
|
|||||||
characters as word delimiters by default, but this can be adjusted by
|
characters as word delimiters by default, but this can be adjusted by
|
||||||
setting the
|
setting the
|
||||||
.Em word-separators
|
.Em word-separators
|
||||||
window option.
|
session option.
|
||||||
Next word moves to the start of the next word, next word end to the end of the
|
Next word moves to the start of the next word, next word end to the end of the
|
||||||
next word and previous word to the start of the previous word.
|
next word and previous word to the start of the previous word.
|
||||||
The three next and previous space keys work similarly but use a space alone as
|
The three next and previous space keys work similarly but use a space alone as
|
||||||
@ -2288,6 +2288,12 @@ window option is enabled.
|
|||||||
If
|
If
|
||||||
.Ic monitor-silence
|
.Ic monitor-silence
|
||||||
is enabled, prints a message after the interval has expired on a given window.
|
is enabled, prints a message after the interval has expired on a given window.
|
||||||
|
.It Ic word-separators Ar string
|
||||||
|
Sets the session's conception of what characters are considered word
|
||||||
|
separators, for the purposes of the next and previous word commands in
|
||||||
|
copy mode.
|
||||||
|
The default is
|
||||||
|
.Ql \ -_@ .
|
||||||
.El
|
.El
|
||||||
.It Xo Ic set-window-option
|
.It Xo Ic set-window-option
|
||||||
.Op Fl agu
|
.Op Fl agu
|
||||||
@ -2528,13 +2534,6 @@ option for details of special character sequences available.
|
|||||||
The default is
|
The default is
|
||||||
.Ql #I:#W#F .
|
.Ql #I:#W#F .
|
||||||
.Pp
|
.Pp
|
||||||
.It Ic word-separators Ar string
|
|
||||||
Sets the window's conception of what characters are considered word
|
|
||||||
separators, for the purposes of the next and previous word commands in
|
|
||||||
copy mode.
|
|
||||||
The default is
|
|
||||||
.Ql \ -_@ .
|
|
||||||
.Pp
|
|
||||||
.It Xo Ic xterm-keys
|
.It Xo Ic xterm-keys
|
||||||
.Op Ic on | off
|
.Op Ic on | off
|
||||||
.Xc
|
.Xc
|
||||||
|
@ -548,13 +548,13 @@ window_copy_key(struct window_pane *wp, struct session *sess, int key)
|
|||||||
break;
|
break;
|
||||||
case MODEKEYCOPY_NEXTWORD:
|
case MODEKEYCOPY_NEXTWORD:
|
||||||
word_separators =
|
word_separators =
|
||||||
options_get_string(&wp->window->options, "word-separators");
|
options_get_string(&sess->options, "word-separators");
|
||||||
for (; np != 0; np--)
|
for (; np != 0; np--)
|
||||||
window_copy_cursor_next_word(wp, word_separators);
|
window_copy_cursor_next_word(wp, word_separators);
|
||||||
break;
|
break;
|
||||||
case MODEKEYCOPY_NEXTWORDEND:
|
case MODEKEYCOPY_NEXTWORDEND:
|
||||||
word_separators =
|
word_separators =
|
||||||
options_get_string(&wp->window->options, "word-separators");
|
options_get_string(&sess->options, "word-separators");
|
||||||
for (; np != 0; np--)
|
for (; np != 0; np--)
|
||||||
window_copy_cursor_next_word_end(wp, word_separators);
|
window_copy_cursor_next_word_end(wp, word_separators);
|
||||||
break;
|
break;
|
||||||
@ -564,7 +564,7 @@ window_copy_key(struct window_pane *wp, struct session *sess, int key)
|
|||||||
break;
|
break;
|
||||||
case MODEKEYCOPY_PREVIOUSWORD:
|
case MODEKEYCOPY_PREVIOUSWORD:
|
||||||
word_separators =
|
word_separators =
|
||||||
options_get_string(&wp->window->options, "word-separators");
|
options_get_string(&sess->options, "word-separators");
|
||||||
for (; np != 0; np--)
|
for (; np != 0; np--)
|
||||||
window_copy_cursor_previous_word(wp, word_separators);
|
window_copy_cursor_previous_word(wp, word_separators);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user