mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
Support all four of the xterm mouse modes. Based on a diff from hsim at
gmx.li.
This commit is contained in:
@ -829,16 +829,23 @@ screen_write_insertmode(struct screen_write_ctx *ctx, int state)
|
||||
s->mode &= ~MODE_INSERT;
|
||||
}
|
||||
|
||||
/* Set mouse mode. */
|
||||
/* Set mouse mode off. */
|
||||
void
|
||||
screen_write_mousemode(struct screen_write_ctx *ctx, int state)
|
||||
screen_write_mousemode_off(struct screen_write_ctx *ctx)
|
||||
{
|
||||
struct screen *s = ctx->s;
|
||||
|
||||
if (state)
|
||||
s->mode |= MODE_MOUSE;
|
||||
else
|
||||
s->mode &= ~MODE_MOUSE;
|
||||
s->mode &= ~ALL_MOUSE_MODES;
|
||||
}
|
||||
|
||||
/* Set mouse mode on. */
|
||||
void
|
||||
screen_write_mousemode_on(struct screen_write_ctx *ctx, int mode)
|
||||
{
|
||||
struct screen *s = ctx->s;
|
||||
|
||||
s->mode &= ~ALL_MOUSE_MODES;
|
||||
s->mode |= mode;
|
||||
}
|
||||
|
||||
/* Line feed. */
|
||||
|
Reference in New Issue
Block a user