-- Investigate why tests/font-add.sh doesn't always work.
- Now that glyphs can be modified it is obviously a suboptimal method.
General font loading could work, it may be worth checking older standard
practice for reference and ideas.
int cfg_color, cfg_monocolor;
bool cfg_mono;
int cfg_refreshspeed, cfg_blinkspeed, cfg_cursormode;
-bool cfg_cursorblink, cfg_cursordisable, cfg_cursorprintreset;
+bool cfg_cursorblink, cfg_cursordisable, cfg_cursorbright,
+ cfg_cursorprintreset;
int cfg_intmin, cfg_intstep, cfg_intfg, cfg_intscan, cfg_intbg;
double cfg_intfgf, cfg_intscanf, cfg_intbgf;
int cfg_text_width, cfg_text_height;
cfg_blinkspeed = BLINK_SPEED;
cfg_cursormode = CURSOR_MODE;
cfg_cursorblink = CURSOR_BLINK;
+ cfg_cursorbright = CURSOR_BRIGHT;
cfg_cursordisable = CURSOR_DISABLE;
cfg_cursorprintreset = CURSOR_PRINTRESET;
extern bool cfg_cursorblink;
+/* Very visible cursor */
+
+#define CURSOR_BRIGHT false
+
+extern bool cfg_cursorbright;
+
/*
* Allow the cursor to be turned off with DEC Private Mode sequence 25.
(st->cursor_mode == CMODE_LINE &&
grow >= (FONT_HEIGHT - 2)) ||
(st->cursor_mode == CMODE_BAR && bit < 2))) {
- color = st->monocolor;
+ if (st->cursor_bright) {
+ intensity = INTENSITY_MAX;
+ fgcolor = color = COLOR_WHITE;
+ } else
+ color = st->monocolor;
if ((m & (TMODE_INVERSE | TMODE_BGCOLOR)) != 0)
p = (p == 0 ? INTENSITY_DIM :
INTENSITY_DIM / 2);
fprintf(stderr,
"\nUsage: %s [-8|-u] [-w <cols>] [-h <rows>] [-E <n>] [-s]\n"
" [-C <color>] [-c] [-W] [-b] [-B <microseconds>] [-P]\n"
- " [-m <mode>] [-d] [-D] [-S] [-p <parameters>]\n"
+ " [-m <mode>] [-M] [-d] [-D] [-S] [-p <parameters>]\n"
" [-e <command> [<arguments>]]\n\n"
"Where:\n"
" -8 / -u - 8-bit mode (Latin-1), unicode+UTF-8. 8-bit mode is\n"
" This can also be changed with ESC [?658467;65538;<n>h\n"
" -P - If the cursor is blinking, reset its timer for printing.\n"
" -m - Set default cursor style (0 = block, 1 = line, 2 = bar).\n"
+ " -M - Enable very visible cursor mode by default.\n"
" -d - Log emulator debug messages to stderr.\n"
" -D - Toggle if the cursor can be disabled or not.\n"
" -S - Wait in a sleeping loop until the user closes the window\n"
cfg_unicode = !locale_8bit();
progname = strdup(argv[0]);
- while ((ch = getopt(argc, argv, "?8uw:h:E:scC:Wr:bB:Pm:dDSp:e:"))
+ while ((ch = getopt(argc, argv, "?8uw:h:E:scC:Wr:bB:Pm:MdDSp:e:"))
!= -1) {
switch (ch) {
case '8':
if ((i = atoi(optarg)) > -1 && i < 3)
cfg_cursormode = i;
break;
+ case 'M':
+ cfg_cursorbright = !cfg_cursorbright;
+ break;
case 'd':
cfg_stderr = true;
break;
st->cursor_mode = cfg_cursormode;
st->cursor_blink = cfg_cursorblink;
st->cursor_disabled = false;
+ st->cursor_bright = cfg_cursorbright;
st->quotedpaste = false;
st->monocolor = cfg_color;
st->mode = 0;
if (state->csiparam[i] == 13)
st->cursor_blink = true;
break;
- case 25: /* Show cursor (DECTCEM) */
+ case 25: /* Show cursor (DECTCEM, cvvis) */
+ /* XXX "Very visible" vs cnorm */
st->cursor_disabled = false;
+ st->cursor_bright = true;
break;
case 2004: /* Bracketed paste mode */
st->quotedpaste = true;
case 4: /* Fast/jump scroll (DECSCLM) */
st->scroll_slow = false;
break;
+ case 6:
+ /* Normal cursor mode (DECOM cnorm) */
+
+ break;
case 12:
case 13: /* FALLTHROUGH
* Stop blinking cursor.
if (state->csiparam[i] == 13)
st->cursor_blink = false;
break;
- case 25: /* Hide cursor (DECTCEM) */
+ case 25: /* Hide cursor (DECTCEM, civis) */
if (cfg_cursordisable)
st->cursor_disabled = true;
break;
/* User-configured as default */
st->cursor_mode = cfg_cursormode;
st->cursor_blink = cfg_cursorblink;
+ st->cursor_bright = cfg_cursorbright;
break;
case 1:
st->cursor_mode = CMODE_BLOCK;
- st->cursor_blink = true;
+ if (cfg_cursorblink)
+ st->cursor_blink = true;
break;
case 2:
st->cursor_mode = CMODE_BLOCK;
break;
case 3:
st->cursor_mode = CMODE_LINE;
- st->cursor_blink = true;
+ if (cfg_cursorblink)
+ st->cursor_blink = true;
break;
case 4:
st->cursor_mode = CMODE_LINE;
break;
case 5:
st->cursor_mode = CMODE_BAR;
- st->cursor_blink = true;
+ if (cfg_cursorblink)
+ st->cursor_blink = true;
break;
case 6:
st->cursor_mode = CMODE_BAR;
bool *text_updated; /* For screen updates */
bool text_updateall;
bool blink_update;
- bool cursor_blink, cursor_disabled;
+ bool cursor_blink, cursor_disabled, cursor_bright;
bool quotedpaste;
int monocolor;
int cursor_mode, cursor_x, cursor_y;
.......
.OO....
.OO..O.
-.....O.
-.OOOOO.
-.O.....
+....O..
+...O...
+..O....
.O..OO.
....OO.
.......
.......
.......
.......
-...O...
+.......
...O...
..O....
.......
52
.......
-.O..O..
+.O.....
.O..O..
.O..O..
.O..O..
.......
...O...
.......
-...O...
+.......
...O...
..O....
.......
.......
.OOOOO.
.O...O.
-...OOO.
+....O..
...O...
...O...
.......
91
.......
-.OOOO..
-.O.....
-.O.....
-.O.....
-.O.....
-.O.....
-.OOOO..
+..OOO..
+..O....
+..O....
+..O....
+..O....
+..O....
+..OOO..
.......
92
93
.......
-..OOOO.
-.....O.
-.....O.
-.....O.
-.....O.
-.....O.
-..OOOO.
+..OOO..
+....O..
+....O..
+....O..
+....O..
+....O..
+..OOO..
.......
94