Make double start-of-line do what double end-of-line does, on wrapped lines.

pull/1/head
Micah Cowan 2010-06-05 07:48:35 +00:00
parent d27956f160
commit d9c99b83c7
1 changed files with 11 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* $Id: window-copy.c,v 1.117 2010-05-22 21:56:04 micahcowan Exp $ */
/* $Id: window-copy.c,v 1.118 2010-06-05 07:48:35 micahcowan Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -1383,7 +1383,17 @@ void
window_copy_cursor_start_of_line(struct window_pane *wp)
{
struct window_copy_mode_data *data = wp->modedata;
struct screen *back_s = data->backing;
struct grid *gd = back_s->grid;
u_int py;
if (data->cx == 0) {
py = screen_hsize(back_s) + data->cy - data->oy;
while (py > 0 && gd->linedata[py-1].flags & GRID_LINE_WRAPPED) {
window_copy_cursor_up(wp, 0);
py = screen_hsize(back_s) + data->cy - data->oy;
}
}
window_copy_update_cursor(wp, 0, data->cy);
if (window_copy_update_selection(wp))
window_copy_redraw_lines(wp, data->cy, 1);