From a61b8a2033cd53281a7226affb97ddcb8b6689da Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 17 Feb 2010 21:27:18 +0000 Subject: [PATCH] Make next-word stop at beginning of word even if it is at the start of the line, from Micah Cowan. --- window-copy.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/window-copy.c b/window-copy.c index 40897602..1b2d1ada 100644 --- a/window-copy.c +++ b/window-copy.c @@ -1263,8 +1263,8 @@ window_copy_cursor_next_word(struct window_pane *wp, const char *separators) py = screen_hsize(base_s) + data->cy - data->oy; xx = window_copy_find_length(wp, py); - } - px++; + } else + px++; } window_copy_update_cursor(wp, px, data->cy); @@ -1295,8 +1295,8 @@ window_copy_cursor_next_word_end(struct window_pane *wp, const char *separators) py = screen_hsize(base_s) + data->cy - data->oy; xx = window_copy_find_length(wp, py); - } - px++; + } else + px++; } /* Find the end of this word. */ @@ -1417,4 +1417,3 @@ window_copy_rectangle_toggle(struct window_pane *wp) window_copy_update_selection(wp); window_copy_redraw_screen(wp); } -