mirror of
https://github.com/tmux/tmux.git
synced 2025-01-14 12:48:56 +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>
|
||||
@ -488,6 +488,7 @@ void
|
||||
input_handle_c0_control(u_char ch, struct input_ctx *ictx)
|
||||
{
|
||||
struct screen *s = ictx->ctx.s;
|
||||
u_char attr;
|
||||
|
||||
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);
|
||||
break;
|
||||
case '\016': /* SO */
|
||||
s->attr |= ATTR_CHARSET;
|
||||
screen_write_set_attributes(&ictx->ctx, s->attr, s->colr);
|
||||
attr = s->attr | ATTR_CHARSET;
|
||||
screen_write_set_attributes(&ictx->ctx, attr, s->colr);
|
||||
break;
|
||||
case '\017': /* SI */
|
||||
s->attr &= ~ATTR_CHARSET;
|
||||
screen_write_set_attributes(&ictx->ctx, s->attr, s->colr);
|
||||
attr = s->attr & ~ATTR_CHARSET;
|
||||
screen_write_set_attributes(&ictx->ctx, attr, s->colr);
|
||||
break;
|
||||
default:
|
||||
log_debug("unknown c0: %hhu", ch);
|
||||
@ -567,12 +568,9 @@ input_handle_private_two(u_char ch, struct input_ctx *ictx)
|
||||
case '8': /* DECRC */
|
||||
if (!(s->mode & MODE_SAVED))
|
||||
break;
|
||||
s->cx = s->saved_cx;
|
||||
s->cy = s->saved_cy;
|
||||
s->attr = s->saved_attr;
|
||||
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);
|
||||
screen_write_set_attributes(
|
||||
&ictx->ctx, s->saved_attr, s->saved_colr);
|
||||
screen_write_move_cursor(&ictx->ctx, s->saved_cx, s->saved_cy);
|
||||
break;
|
||||
default:
|
||||
log_debug("unknown p2: %hhu", ch);
|
||||
|
Loading…
Reference in New Issue
Block a user