mirror of
https://github.com/tmux/tmux.git
synced 2024-11-18 02:18:53 +00:00
Merge branch 'master' into 3.3-rc
This commit is contained in:
commit
53ee4f0334
@ -492,6 +492,7 @@ key_bindings_init(void)
|
||||
"bind -Tcopy-mode \\; { send -X jump-again }",
|
||||
"bind -Tcopy-mode F { command-prompt -1p'(jump backward)' { send -X jump-backward '%%' } }",
|
||||
"bind -Tcopy-mode N { send -X search-reverse }",
|
||||
"bind -Tcopy-mode P { send -X toggle-position }",
|
||||
"bind -Tcopy-mode R { send -X rectangle-toggle }",
|
||||
"bind -Tcopy-mode T { command-prompt -1p'(jump to backward)' { send -X jump-to-backward '%%' } }",
|
||||
"bind -Tcopy-mode X { send -X set-mark }",
|
||||
@ -588,6 +589,7 @@ key_bindings_init(void)
|
||||
"bind -Tcopy-mode-vi L { send -X bottom-line }",
|
||||
"bind -Tcopy-mode-vi M { send -X middle-line }",
|
||||
"bind -Tcopy-mode-vi N { send -X search-reverse }",
|
||||
"bind -Tcopy-mode-vi P { send -X toggle-position }",
|
||||
"bind -Tcopy-mode-vi T { command-prompt -1p'(jump to backward)' { send -X jump-to-backward '%%' } }",
|
||||
"bind -Tcopy-mode-vi V { send -X select-line }",
|
||||
"bind -Tcopy-mode-vi W { send -X next-space }",
|
||||
|
4
status.c
4
status.c
@ -718,7 +718,7 @@ status_prompt_redraw(struct client *c)
|
||||
memcpy(&cursorgc, &gc, sizeof cursorgc);
|
||||
cursorgc.attr ^= GRID_ATTR_REVERSE;
|
||||
|
||||
start = screen_write_strlen("%s", c->prompt_string);
|
||||
start = format_width(c->prompt_string);
|
||||
if (start > c->tty.sx)
|
||||
start = c->tty.sx;
|
||||
|
||||
@ -728,7 +728,7 @@ status_prompt_redraw(struct client *c)
|
||||
for (offset = 0; offset < c->tty.sx; offset++)
|
||||
screen_write_putc(&ctx, &gc, ' ');
|
||||
screen_write_cursormove(&ctx, 0, lines - 1, 0);
|
||||
screen_write_nputs(&ctx, start, &gc, "%s", c->prompt_string);
|
||||
format_draw(&ctx, &gc, start, c->prompt_string, NULL, 0);
|
||||
screen_write_cursormove(&ctx, start, lines - 1, 0);
|
||||
|
||||
left = c->tty.sx - start;
|
||||
|
1
tmux.1
1
tmux.1
@ -1776,6 +1776,7 @@ The following commands are supported in copy mode:
|
||||
.It Li "set-mark" Ta "X" Ta "X"
|
||||
.It Li "start-of-line" Ta "0" Ta "C-a"
|
||||
.It Li "stop-selection" Ta "" Ta ""
|
||||
.It Li "toggle-position" Ta "P" Ta "P"
|
||||
.It Li "top-line" Ta "H" Ta "M-R"
|
||||
.El
|
||||
.Pp
|
||||
|
@ -1272,6 +1272,16 @@ window_copy_cmd_halfpage_up(struct window_copy_cmd_state *cs)
|
||||
return (WINDOW_COPY_CMD_NOTHING);
|
||||
}
|
||||
|
||||
static enum window_copy_cmd_action
|
||||
window_copy_cmd_toggle_position(struct window_copy_cmd_state *cs)
|
||||
{
|
||||
struct window_mode_entry *wme = cs->wme;
|
||||
struct window_copy_mode_data *data = wme->data;
|
||||
|
||||
data->hide_position = !data->hide_position;
|
||||
return (WINDOW_COPY_CMD_REDRAW);
|
||||
}
|
||||
|
||||
static enum window_copy_cmd_action
|
||||
window_copy_cmd_history_bottom(struct window_copy_cmd_state *cs)
|
||||
{
|
||||
@ -2817,6 +2827,12 @@ static const struct {
|
||||
.clear = WINDOW_COPY_CMD_CLEAR_ALWAYS,
|
||||
.f = window_copy_cmd_stop_selection
|
||||
},
|
||||
{ .command = "toggle-position",
|
||||
.minargs = 0,
|
||||
.maxargs = 0,
|
||||
.clear = WINDOW_COPY_CMD_CLEAR_NEVER,
|
||||
.f = window_copy_cmd_toggle_position
|
||||
},
|
||||
{ .command = "top-line",
|
||||
.minargs = 0,
|
||||
.maxargs = 0,
|
||||
|
Loading…
Reference in New Issue
Block a user