=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/window-copy.c,v retrieving revision 1.91 retrieving revision 1.92 diff -u -r1.91 -r1.92 --- src/usr.bin/tmux/window-copy.c 2013/03/25 11:43:33 1.91 +++ src/usr.bin/tmux/window-copy.c 2013/07/05 14:41:36 1.92 @@ -1,4 +1,4 @@ -/* $OpenBSD: window-copy.c,v 1.91 2013/03/25 11:43:33 nicm Exp $ */ +/* $OpenBSD: window-copy.c,v 1.92 2013/07/05 14:41:36 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -1894,6 +1894,7 @@ window_copy_cursor_next_word_end(struct window_pane *wp, const char *separators) { struct window_copy_mode_data *data = wp->modedata; + struct options *oo = &wp->window->options; struct screen *back_s = data->backing; u_int px, py, xx, yy; int expected = 1; @@ -1926,6 +1927,10 @@ } expected = !expected; } while (expected == 0); + + /* Back up to the end-of-word like vi. */ + if (options_get_number(oo, "status-keys") == MODEKEY_VI && px != 0) + px--; window_copy_update_cursor(wp, px, data->cy); if (window_copy_update_selection(wp))