Download raw body.
ksh: standout mode for horizontal scrolling indicators
Hi tech@,
I got slightly confused by a scrolling indicator that made me believe it
was a file redirection. Given that ksh already uses curses on !SMALL
builds, printing the indicator with standout enabled is easy. Tested
both on the glass console and xterm.
Opinions?
diff /usr/src
path + /usr/src
commit - a556b9dbc0d568f20ed9322450b6206ba70d8a13
blob - 3c9b0074d81289a9638b0009a182ce139b8a497e
file + bin/ksh/emacs.c
--- bin/ksh/emacs.c
+++ bin/ksh/emacs.c
@@ -1081,7 +1081,14 @@ x_redraw(int limit)
i = '>';
} else if (xbp > xbuf)
i = '<';
- x_e_putc(i);
+#ifndef SMALL
+ if (i != ' ' && enter_standout_mode && exit_standout_mode) {
+ (void)tputs(enter_standout_mode, 1, x_putc);
+ x_e_putc(i);
+ (void)tputs(exit_standout_mode, 1, x_putc);
+ } else
+#endif
+ x_e_putc(i);
j++;
while (j--)
x_e_putc('\b');
commit - a556b9dbc0d568f20ed9322450b6206ba70d8a13
blob - cdda9cb24b1a4a395547e081ff3adca380d3b6c1
file + bin/ksh/vi.c
--- bin/ksh/vi.c
+++ bin/ksh/vi.c
@@ -1962,7 +1962,14 @@ display(char *wb1, char *wb2, int leftside)
mc = ' ';
if (mc != morec) {
ed_mov_opt(pwidth + winwidth + 1, wb1);
- x_putc(mc);
+#ifndef SMALL
+ if (enter_standout_mode && exit_standout_mode) {
+ (void)tputs(enter_standout_mode, 1, x_putc);
+ x_putc(mc);
+ (void)tputs(exit_standout_mode, 1, x_putc);
+ } else
+#endif
+ x_putc(mc);
cur_col++;
morec = mc;
lastb = -1;
ksh: standout mode for horizontal scrolling indicators