mirror of
https://github.com/tmux/tmux.git
synced 2026-07-09 10:59:30 +00:00
Do not exit at bottom if a selection is in progress, GitHub issue 5349
from xiaomublue at gmail dot com.
This commit is contained in:
4
tmux.1
4
tmux.1
@@ -2340,7 +2340,8 @@ but also exit copy mode if the cursor reaches the bottom.
|
||||
.It Xo
|
||||
.Ic scroll\-exit\-on
|
||||
.Xc
|
||||
Turn on exiting copy mode when scrolling to the end of the buffer.
|
||||
Turn on exiting copy mode when scrolling to the end of the buffer, unless a
|
||||
selection is present.
|
||||
.It Xo
|
||||
.Ic scroll\-exit\-off
|
||||
.Xc
|
||||
@@ -2617,6 +2618,7 @@ instead of
|
||||
.Fl e
|
||||
specifies that scrolling to the bottom of the history (to the visible screen)
|
||||
should exit copy mode.
|
||||
This will not happen if a selection is present.
|
||||
While in copy mode, pressing a key other than those used for scrolling will
|
||||
disable this behaviour.
|
||||
This is intended to allow fast scrolling through a pane's history, for
|
||||
|
||||
@@ -854,7 +854,7 @@ window_copy_scroll1(struct window_mode_entry *wme, struct window_pane *wp,
|
||||
window_copy_cursor_end_of_line(wme);
|
||||
}
|
||||
|
||||
if (scroll_exit && data->oy == 0) {
|
||||
if (scroll_exit && data->oy == 0 && data->screen.sel == NULL) {
|
||||
window_pane_reset_mode(wp);
|
||||
return;
|
||||
}
|
||||
@@ -972,7 +972,7 @@ window_copy_pagedown1(struct window_mode_entry *wme, int half_page,
|
||||
window_copy_cursor_end_of_line(wme);
|
||||
}
|
||||
|
||||
if (scroll_exit && data->oy == 0)
|
||||
if (scroll_exit && data->oy == 0 && data->screen.sel == NULL)
|
||||
return (1);
|
||||
if (data->searchmark != NULL && !data->timeout)
|
||||
window_copy_search_marks(wme, NULL, data->searchregex, 1);
|
||||
@@ -2352,7 +2352,7 @@ window_copy_cmd_scroll_down(struct window_copy_cmd_state *cs)
|
||||
|
||||
for (; np != 0; np--)
|
||||
window_copy_cursor_down(wme, 1);
|
||||
if (data->scroll_exit && data->oy == 0)
|
||||
if (data->scroll_exit && data->oy == 0 && data->screen.sel == NULL)
|
||||
return (WINDOW_COPY_CMD_CANCEL);
|
||||
return (WINDOW_COPY_CMD_NOTHING);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user