summaryrefslogtreecommitdiff
path: root/app/xterm/doublechr.c
diff options
context:
space:
mode:
Diffstat (limited to 'app/xterm/doublechr.c')
-rw-r--r--app/xterm/doublechr.c44
1 files changed, 37 insertions, 7 deletions
diff --git a/app/xterm/doublechr.c b/app/xterm/doublechr.c
index bff770150..3c13ef01a 100644
--- a/app/xterm/doublechr.c
+++ b/app/xterm/doublechr.c
@@ -1,7 +1,7 @@
-/* $XTermId: doublechr.c,v 1.76 2011/09/11 14:59:40 tom Exp $ */
+/* $XTermId: doublechr.c,v 1.81 2012/04/15 23:39:53 tom Exp $ */
/*
- * Copyright 1997-2010,2011 by Thomas E. Dickey
+ * Copyright 1997-2011,2012 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -60,7 +60,8 @@ repaint_line(XtermWidget xw, unsigned newChrSet)
/*
* Ignore repetition.
*/
- if ((ld = getLineData(screen, currow)) != 0) {
+ if (!IsLeftRightMode(xw)
+ && (ld = getLineData(screen, currow)) != 0) {
unsigned oldChrSet = GetLineDblCS(ld);
if (oldChrSet != newChrSet) {
@@ -83,10 +84,11 @@ repaint_line(XtermWidget xw, unsigned newChrSet)
* single-size and double-size font. So we paint our own.
*/
ClearCurBackground(xw,
- CursorY(screen, currow),
- LineCursorX(screen, ld, 0),
- (unsigned) FontHeight(screen),
- len * (unsigned) LineFontWidth(screen, ld));
+ currow,
+ 0,
+ 1,
+ len,
+ (unsigned) LineFontWidth(screen, ld));
SetLineDblCS(ld, newChrSet);
@@ -134,6 +136,34 @@ xterm_DECDWL(XtermWidget xw GCC_UNUSED)
#endif
}
+/*
+ * Reset all lines on the screen to single-width/single-height.
+ */
+void
+xterm_ResetDouble(XtermWidget xw)
+{
+#if OPT_DEC_CHRSET
+ TScreen *screen = TScreenOf(xw);
+ Boolean changed = False;
+ LineData *ld;
+ unsigned code;
+ int row;
+
+ for (row = 0; row < screen->max_row; ++row) {
+ if ((ld = getLineData(screen, ROW2INX(screen, row))) != 0) {
+ code = GetLineDblCS(ld);
+ if (code != CSET_SWL) {
+ SetLineDblCS(ld, CSET_SWL);
+ changed = True;
+ }
+ }
+ }
+ if (changed) {
+ xtermRepaint(xw);
+ }
+#endif
+}
+
#if OPT_DEC_CHRSET
static void
discard_font(XtermWidget xw, int n)