diff options
author | 2011-11-15 23:24:04 +0000 | |
---|---|---|
committer | 2011-11-15 23:24:04 +0000 | |
commit | 6b9660926fda3dc5e5c972863308992dc0159648 (patch) | |
tree | b8c95745581455d9c8d8c23461e5c426f15cfd21 | |
parent | - change callback prototypes in filter.c to allow stricter checks (diff) | |
download | wireguard-openbsd-6b9660926fda3dc5e5c972863308992dc0159648.tar.xz wireguard-openbsd-6b9660926fda3dc5e5c972863308992dc0159648.zip |
Move word-separators to be a session rather than window option, from Ben
Boeckel.
-rw-r--r-- | usr.bin/tmux/options-table.c | 12 | ||||
-rw-r--r-- | usr.bin/tmux/tmux.1 | 19 | ||||
-rw-r--r-- | usr.bin/tmux/window-copy.c | 8 |
3 files changed, 19 insertions, 20 deletions
diff --git a/usr.bin/tmux/options-table.c b/usr.bin/tmux/options-table.c index 6ee9fe434cc..d6cebc2edd8 100644 --- a/usr.bin/tmux/options-table.c +++ b/usr.bin/tmux/options-table.c @@ -1,4 +1,4 @@ -/* $OpenBSD: options-table.c,v 1.15 2011/11/05 09:06:31 nicm Exp $ */ +/* $OpenBSD: options-table.c,v 1.16 2011/11/15 23:24:04 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott <nicm@users.sourceforge.net> @@ -421,6 +421,11 @@ const struct options_table_entry session_options_table[] = { .default_num = 0 }, + { .name = "word-separators", + .type = OPTIONS_TABLE_STRING, + .default_str = " -_@" + }, + { .name = NULL } }; @@ -615,11 +620,6 @@ const struct options_table_entry window_options_table[] = { .default_str = "#I:#W#F" }, - { .name = "word-separators", - .type = OPTIONS_TABLE_STRING, - .default_str = " -_@" - }, - { .name = "xterm-keys", .type = OPTIONS_TABLE_FLAG, .default_num = 0 diff --git a/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1 index 33989004642..a82e1c83e79 100644 --- a/usr.bin/tmux/tmux.1 +++ b/usr.bin/tmux/tmux.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tmux.1,v 1.254 2011/11/05 09:13:00 nicm Exp $ +.\" $OpenBSD: tmux.1,v 1.255 2011/11/15 23:24:04 nicm Exp $ .\" .\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> .\" @@ -14,7 +14,7 @@ .\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: November 5 2011 $ +.Dd $Mdocdate: November 15 2011 $ .Dt TMUX 1 .Os .Sh NAME @@ -837,7 +837,7 @@ and characters as word delimiters by default, but this can be adjusted by setting the .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 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 @@ -2288,6 +2288,12 @@ window option is enabled. If .Ic monitor-silence 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 .It Xo Ic set-window-option .Op Fl agu @@ -2528,13 +2534,6 @@ option for details of special character sequences available. The default is .Ql #I:#W#F . .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 .Op Ic on | off .Xc diff --git a/usr.bin/tmux/window-copy.c b/usr.bin/tmux/window-copy.c index 338bfcb74e2..a2674c7c28d 100644 --- a/usr.bin/tmux/window-copy.c +++ b/usr.bin/tmux/window-copy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window-copy.c,v 1.74 2011/10/23 23:38:16 nicm Exp $ */ +/* $OpenBSD: window-copy.c,v 1.75 2011/11/15 23:24:04 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -548,13 +548,13 @@ window_copy_key(struct window_pane *wp, struct session *sess, int key) break; case MODEKEYCOPY_NEXTWORD: word_separators = - options_get_string(&wp->window->options, "word-separators"); + options_get_string(&sess->options, "word-separators"); for (; np != 0; np--) window_copy_cursor_next_word(wp, word_separators); break; case MODEKEYCOPY_NEXTWORDEND: word_separators = - options_get_string(&wp->window->options, "word-separators"); + options_get_string(&sess->options, "word-separators"); for (; np != 0; np--) window_copy_cursor_next_word_end(wp, word_separators); break; @@ -564,7 +564,7 @@ window_copy_key(struct window_pane *wp, struct session *sess, int key) break; case MODEKEYCOPY_PREVIOUSWORD: word_separators = - options_get_string(&wp->window->options, "word-separators"); + options_get_string(&sess->options, "word-separators"); for (; np != 0; np--) window_copy_cursor_previous_word(wp, word_separators); break; |