mirror of
https://github.com/tmux/tmux.git
synced 2025-01-12 03:08:46 +00:00
Make double start-of-line do what double end-of-line does, on wrapped lines.
This commit is contained in:
parent
d27956f160
commit
d9c99b83c7
@ -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>
|
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -1383,7 +1383,17 @@ void
|
|||||||
window_copy_cursor_start_of_line(struct window_pane *wp)
|
window_copy_cursor_start_of_line(struct window_pane *wp)
|
||||||
{
|
{
|
||||||
struct window_copy_mode_data *data = wp->modedata;
|
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);
|
window_copy_update_cursor(wp, 0, data->cy);
|
||||||
if (window_copy_update_selection(wp))
|
if (window_copy_update_selection(wp))
|
||||||
window_copy_redraw_lines(wp, data->cy, 1);
|
window_copy_redraw_lines(wp, data->cy, 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user