mirror of
https://github.com/tmux/tmux.git
synced 2025-01-15 05:09:04 +00:00
Fix charset stuff.
This commit is contained in:
parent
194c871611
commit
08d7be638e
20
input.c
20
input.c
@ -1,4 +1,4 @@
|
|||||||
/* $Id: input.c,v 1.44 2007-12-06 09:46:22 nicm Exp $ */
|
/* $Id: input.c,v 1.45 2007-12-06 13:54:33 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -488,6 +488,7 @@ void
|
|||||||
input_handle_c0_control(u_char ch, struct input_ctx *ictx)
|
input_handle_c0_control(u_char ch, struct input_ctx *ictx)
|
||||||
{
|
{
|
||||||
struct screen *s = ictx->ctx.s;
|
struct screen *s = ictx->ctx.s;
|
||||||
|
u_char attr;
|
||||||
|
|
||||||
log_debug2("-- c0 %zu: %hhu", ictx->off, ch);
|
log_debug2("-- c0 %zu: %hhu", ictx->off, ch);
|
||||||
|
|
||||||
@ -515,12 +516,12 @@ input_handle_c0_control(u_char ch, struct input_ctx *ictx)
|
|||||||
screen_write_move_cursor(&ictx->ctx, s->cx, s->cy);
|
screen_write_move_cursor(&ictx->ctx, s->cx, s->cy);
|
||||||
break;
|
break;
|
||||||
case '\016': /* SO */
|
case '\016': /* SO */
|
||||||
s->attr |= ATTR_CHARSET;
|
attr = s->attr | ATTR_CHARSET;
|
||||||
screen_write_set_attributes(&ictx->ctx, s->attr, s->colr);
|
screen_write_set_attributes(&ictx->ctx, attr, s->colr);
|
||||||
break;
|
break;
|
||||||
case '\017': /* SI */
|
case '\017': /* SI */
|
||||||
s->attr &= ~ATTR_CHARSET;
|
attr = s->attr & ~ATTR_CHARSET;
|
||||||
screen_write_set_attributes(&ictx->ctx, s->attr, s->colr);
|
screen_write_set_attributes(&ictx->ctx, attr, s->colr);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
log_debug("unknown c0: %hhu", ch);
|
log_debug("unknown c0: %hhu", ch);
|
||||||
@ -567,12 +568,9 @@ input_handle_private_two(u_char ch, struct input_ctx *ictx)
|
|||||||
case '8': /* DECRC */
|
case '8': /* DECRC */
|
||||||
if (!(s->mode & MODE_SAVED))
|
if (!(s->mode & MODE_SAVED))
|
||||||
break;
|
break;
|
||||||
s->cx = s->saved_cx;
|
screen_write_set_attributes(
|
||||||
s->cy = s->saved_cy;
|
&ictx->ctx, s->saved_attr, s->saved_colr);
|
||||||
s->attr = s->saved_attr;
|
screen_write_move_cursor(&ictx->ctx, s->saved_cx, s->saved_cy);
|
||||||
s->colr = s->saved_colr;
|
|
||||||
screen_write_set_attributes(&ictx->ctx, s->attr, s->colr);
|
|
||||||
screen_write_move_cursor(&ictx->ctx, s->cx, s->cy);
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
log_debug("unknown p2: %hhu", ch);
|
log_debug("unknown p2: %hhu", ch);
|
||||||
|
Loading…
Reference in New Issue
Block a user