mirror of
https://github.com/tmux/tmux.git
synced 2025-03-13 21:58:48 +00:00
Merge branch 'obsd-master'
This commit is contained in:
commit
33ebb9ec39
@ -247,8 +247,14 @@ key_string_lookup_key(key_code key)
|
|||||||
/* Handle special keys. */
|
/* Handle special keys. */
|
||||||
if (key == KEYC_UNKNOWN)
|
if (key == KEYC_UNKNOWN)
|
||||||
return ("Unknown");
|
return ("Unknown");
|
||||||
|
if (key == KEYC_FOCUS_IN)
|
||||||
|
return ("FocusIn");
|
||||||
|
if (key == KEYC_FOCUS_OUT)
|
||||||
|
return ("FocusOut");
|
||||||
if (key == KEYC_MOUSE)
|
if (key == KEYC_MOUSE)
|
||||||
return ("Mouse");
|
return ("Mouse");
|
||||||
|
if (key == KEYC_DRAGGING)
|
||||||
|
return ("Dragging");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Special case: display C-@ as C-Space. Could do this below in
|
* Special case: display C-@ as C-Space. Could do this below in
|
||||||
|
@ -756,7 +756,7 @@ server_client_handle_key(struct client *c, key_code key)
|
|||||||
wp = w->active;
|
wp = w->active;
|
||||||
|
|
||||||
/* Forward mouse keys if disabled. */
|
/* Forward mouse keys if disabled. */
|
||||||
if (key == KEYC_MOUSE && !options_get_number(s->options, "mouse"))
|
if (KEYC_IS_MOUSE(key) && !options_get_number(s->options, "mouse"))
|
||||||
goto forward;
|
goto forward;
|
||||||
|
|
||||||
/* Treat everything as a regular key when pasting is detected. */
|
/* Treat everything as a regular key when pasting is detected. */
|
||||||
|
17
tty.c
17
tty.c
@ -565,9 +565,7 @@ tty_update_mode(struct tty *tty, int mode, struct screen *s)
|
|||||||
if (mode & ALL_MOUSE_MODES) {
|
if (mode & ALL_MOUSE_MODES) {
|
||||||
/*
|
/*
|
||||||
* Enable the SGR (1006) extension unconditionally, as
|
* Enable the SGR (1006) extension unconditionally, as
|
||||||
* this is safe from misinterpretation. Do it in this
|
* it is safe from misinterpretation.
|
||||||
* order, because in some terminals it's the last one
|
|
||||||
* that takes effect and SGR is the preferred one.
|
|
||||||
*/
|
*/
|
||||||
tty_puts(tty, "\033[?1006h");
|
tty_puts(tty, "\033[?1006h");
|
||||||
if (mode & MODE_MOUSE_BUTTON)
|
if (mode & MODE_MOUSE_BUTTON)
|
||||||
@ -1135,13 +1133,12 @@ tty_cmd_cell(struct tty *tty, const struct tty_ctx *ctx)
|
|||||||
struct screen *s = wp->screen;
|
struct screen *s = wp->screen;
|
||||||
u_int cx, width;
|
u_int cx, width;
|
||||||
|
|
||||||
if (ctx->xoff + ctx->ocx > tty->sx - 1 &&
|
if (ctx->xoff + ctx->ocx > tty->sx - 1 && ctx->ocy == ctx->orlower) {
|
||||||
ctx->ocy == ctx->orlower &&
|
if (tty_pane_full_width(tty, ctx))
|
||||||
tty_pane_full_width(tty, ctx))
|
tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower);
|
||||||
tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower);
|
else
|
||||||
else
|
tty_margin_off(tty);
|
||||||
tty_region_off(tty);
|
}
|
||||||
tty_margin_off(tty);
|
|
||||||
|
|
||||||
/* Is the cursor in the very last position? */
|
/* Is the cursor in the very last position? */
|
||||||
width = ctx->cell->data.width;
|
width = ctx->cell->data.width;
|
||||||
|
Loading…
Reference in New Issue
Block a user