Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam
2026-06-13 22:00:06 +01:00
2 changed files with 22 additions and 0 deletions

10
tmux.1
View File

@@ -2322,6 +2322,11 @@ that line.
(emacs: C\-Down) (emacs: C\-Down)
.Xc .Xc
Scroll down. Scroll down.
If
.Ic mode\-keys
is
.Ic vi ,
the cursor is fixed relative to the text.
.It Xo .It Xo
.Ic scroll\-down\-and\-cancel .Ic scroll\-down\-and\-cancel
.Xc .Xc
@@ -2363,6 +2368,11 @@ that line.
(emacs: C\-Up) (emacs: C\-Up)
.Xc .Xc
Scroll up. Scroll up.
If
.Ic mode\-keys
is
.Ic vi ,
the cursor is fixed relative to the text.
.It Xo .It Xo
.Ic search\-again .Ic search\-again
(vi: n) (vi: n)

View File

@@ -6105,6 +6105,7 @@ static void
window_copy_cursor_up(struct window_mode_entry *wme, int scroll_only) window_copy_cursor_up(struct window_mode_entry *wme, int scroll_only)
{ {
struct window_copy_mode_data *data = wme->data; struct window_copy_mode_data *data = wme->data;
struct options *oo = wme->wp->window->options;
struct screen *s = &data->screen; struct screen *s = &data->screen;
u_int ox, oy, px, py; u_int ox, oy, px, py;
int norectsel; int norectsel;
@@ -6120,6 +6121,11 @@ window_copy_cursor_up(struct window_mode_entry *wme, int scroll_only)
if (data->lineflag == LINE_SEL_LEFT_RIGHT && oy == data->sely) if (data->lineflag == LINE_SEL_LEFT_RIGHT && oy == data->sely)
window_copy_other_end(wme); window_copy_other_end(wme);
if (scroll_only && options_get_number(oo, "mode-keys") == MODEKEY_VI) {
if (data->cy < screen_size_y(s) - 1)
window_copy_update_cursor(wme, data->cx, data->cy + 1);
}
if (scroll_only || data->cy == 0) { if (scroll_only || data->cy == 0) {
if (norectsel) if (norectsel)
data->cx = data->lastcx; data->cx = data->lastcx;
@@ -6179,6 +6185,7 @@ static void
window_copy_cursor_down(struct window_mode_entry *wme, int scroll_only) window_copy_cursor_down(struct window_mode_entry *wme, int scroll_only)
{ {
struct window_copy_mode_data *data = wme->data; struct window_copy_mode_data *data = wme->data;
struct options *oo = wme->wp->window->options;
struct screen *s = &data->screen; struct screen *s = &data->screen;
u_int ox, oy, px, py; u_int ox, oy, px, py;
int norectsel; int norectsel;
@@ -6194,6 +6201,11 @@ window_copy_cursor_down(struct window_mode_entry *wme, int scroll_only)
if (data->lineflag == LINE_SEL_RIGHT_LEFT && oy == data->endsely) if (data->lineflag == LINE_SEL_RIGHT_LEFT && oy == data->endsely)
window_copy_other_end(wme); window_copy_other_end(wme);
if (scroll_only && options_get_number(oo, "mode-keys") == MODEKEY_VI) {
if (data->cy > 0)
window_copy_update_cursor(wme, data->cx, data->cy - 1);
}
if (scroll_only || data->cy == screen_size_y(s) - 1) { if (scroll_only || data->cy == screen_size_y(s) - 1) {
if (norectsel) if (norectsel)
data->cx = data->lastcx; data->cx = data->lastcx;