~ubuntu-branches/ubuntu/natty/xterm/natty

« back to all changes in this revision

Viewing changes to screen.c

  • Committer: Bazaar Package Importer
  • Author(s): Lorenzo De Liso
  • Date: 2010-11-24 22:54:46 UTC
  • mfrom: (1.4.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20101124225446-il665jqaw71698x8
Tags: 267-0ubuntu1
* New upstream release (LP: #677129):
  + Minor formatting changes to ctlseqs.ms to simplify a script which 
    extracts the feature information
  + Add docs-clean makefile rule
  + Add copy-selection action (request by Timo Juhani Lindfors, 
    Debian #588785)
  + Trim leading/trailing blanks from string used for "Selection" font-menu 
    data
  + Trim leading/trailing blanks from color resource values
  + Configure script improvements:
    + Add workaround for removal of X11 dependency from Xt's package file 
      (report by Robert Hooker)
    + Add workaround for removal of fontconfig dependency from Xft's package 
      file (report by Jeremy Huddleston)
    + Add workaround for removal of Xmu dependency from Xaw's package file 
      (report by Jeremy Huddleston)
    + Improve workaround in CF_X_TOOLKIT macro, checking for other possible 
      packages where Xt's dependencies may be given
    + Prefer ${name:=value} to ${name-value}, since recent bash changes 
      break legacy support for that feature  

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $XTermId: screen.c,v 1.423 2010/06/14 00:00:58 tom Exp $ */
 
1
/* $XTermId: screen.c,v 1.426 2010/10/11 00:46:05 tom Exp $ */
2
2
 
3
3
/*
4
4
 * Copyright 1999-2009,2010 by Thomas E. Dickey
1237
1237
            }
1238
1238
        });
1239
1239
        LineClrWrapped(ld);
 
1240
        if (screen->show_wrap_marks) {
 
1241
            ShowWrapMarks(xw, row, ld);
 
1242
        }
1240
1243
    }
1241
1244
    ClearCells(xw, 0, n, row, (last - (int) n));
1242
1245
 
1244
1247
}
1245
1248
 
1246
1249
/*
 
1250
 * This is useful for debugging both xterm and applications that may manipulate
 
1251
 * its line-wrapping state.
 
1252
 */
 
1253
void
 
1254
ShowWrapMarks(XtermWidget xw, int row, LineData * ld)
 
1255
{
 
1256
    TScreen *screen = TScreenOf(xw);
 
1257
    Boolean set = LineTstWrapped(ld);
 
1258
    CgsEnum cgsId = set ? gcVTcursFilled : gcVTcursReverse;
 
1259
    VTwin *currentWin = WhichVWin(screen);
 
1260
    int y = row * FontHeight(screen) + screen->border;
 
1261
    int x = LineCursorX(screen, ld, screen->max_col + 1);
 
1262
 
 
1263
    TRACE2(("ShowWrapMarks %d:%s\n", row, BtoS(set)));
 
1264
 
 
1265
    XFillRectangle(screen->display, VWindow(screen),
 
1266
                   getCgsGC(xw, currentWin, cgsId),
 
1267
                   x, y,
 
1268
                   (unsigned) screen->border,
 
1269
                   (unsigned) FontHeight(screen));
 
1270
}
 
1271
 
 
1272
/*
1247
1273
 * Repaints the area enclosed by the parameters.
1248
1274
 * Requires: (toprow, leftcol), (toprow + nrows, leftcol + ncols) are
1249
1275
 *           coordinates of characters in screen;
1326
1352
            || ld->attribs == 0) {
1327
1353
            break;
1328
1354
        }
 
1355
 
 
1356
        if (screen->show_wrap_marks) {
 
1357
            ShowWrapMarks(xw, lastind, ld);
 
1358
        }
 
1359
 
1329
1360
        if (maxcol >= (int) ld->lineSize) {
1330
1361
            maxcol = ld->lineSize - 1;
1331
1362
            hi_col = maxcol;
1656
1687
                SetLineDblCS(ld, CSET_SWL);
1657
1688
            });
1658
1689
            LineClrWrapped(ld);
 
1690
            if (screen->show_wrap_marks) {
 
1691
                ShowWrapMarks(xw, row, ld);
 
1692
            }
1659
1693
            ClearCells(xw, 0, len, row, 0);
1660
1694
        }
1661
1695
    }