[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemacs-commit] qemacs qe.c tty.c
From: |
Charlie Gordon |
Subject: |
[Qemacs-commit] qemacs qe.c tty.c |
Date: |
Thu, 18 May 2017 10:14:28 -0400 (EDT) |
CVSROOT: /sources/qemacs
Module name: qemacs
Changes by: Charlie Gordon <chqrlie> 17/05/18 10:14:28
Modified files:
. : qe.c tty.c
Log message:
basic: fix small issues
- fix spurious crash bug on bad qesession file.
- make bold terminal text with colors 0-7 appear brighter
this makes black bold terminal test appear grey instead
of invisible
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/qe.c?cvsroot=qemacs&r1=1.286&r2=1.287
http://cvs.savannah.gnu.org/viewcvs/qemacs/tty.c?cvsroot=qemacs&r1=1.87&r2=1.88
Patches:
Index: qe.c
===================================================================
RCS file: /sources/qemacs/qemacs/qe.c,v
retrieving revision 1.286
retrieving revision 1.287
diff -u -b -r1.286 -r1.287
--- qe.c 15 May 2017 07:57:12 -0000 1.286
+++ qe.c 18 May 2017 14:14:28 -0000 1.287
@@ -2880,16 +2880,21 @@
QEStyleDef *s;
if (style & QE_TERM_COMPOSITE) {
- stp->fg_color = qe_unmap_color(QE_TERM_GET_FG(style),
QE_TERM_FG_COLORS);
- stp->bg_color = qe_unmap_color(QE_TERM_GET_BG(style),
QE_TERM_BG_COLORS);
+ int fg = QE_TERM_GET_FG(style);
+ int bg = QE_TERM_GET_BG(style);
+ if (style & QE_TERM_BOLD) {
+ stp->font_style |= QE_FONT_STYLE_BOLD;
+ if (fg < 8)
+ fg |= 8;
+ }
if (style & QE_TERM_UNDERLINE)
stp->font_style |= QE_FONT_STYLE_UNDERLINE;
- if (style & QE_TERM_BOLD)
- stp->font_style |= QE_FONT_STYLE_BOLD;
if (style & QE_TERM_ITALIC)
stp->font_style |= QE_FONT_STYLE_ITALIC;
if (style & QE_TERM_BLINK)
stp->font_style |= QE_FONT_STYLE_BLINK;
+ stp->fg_color = qe_unmap_color(fg, QE_TERM_FG_COLORS);
+ stp->bg_color = qe_unmap_color(bg, QE_TERM_BG_COLORS);
} else {
s = &qe_styles[style & QE_STYLE_NUM];
if (s->fg_color != COLOR_TRANSPARENT)
@@ -5377,6 +5382,11 @@
c->keys[c->nb_keys++] = key;
s = qs->active_window;
+ if (s == NULL) {
+ s = qs->active_window = qs->first_window;
+ if (s == NULL)
+ return;
+ }
put_status(s, " "); /* Erase pending keystrokes and message */
dpy_flush(&global_screen);
Index: tty.c
===================================================================
RCS file: /sources/qemacs/qemacs/tty.c,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -b -r1.87 -r1.88
--- tty.c 15 May 2017 09:44:21 -0000 1.87
+++ tty.c 18 May 2017 14:14:28 -0000 1.88
@@ -1145,7 +1145,7 @@
(rgb >> 16) & 255, (rgb >> 8) & 255,
(rgb >> 0) & 255);
} else
#endif
- if (ts->term_bg_colors_count > 16) {
+ if (ts->term_bg_colors_count > 16 && bgcolor >= 16) {
TTY_FPRINTF(s->STDOUT, "\033[48;5;%dm", bgcolor);
} else
if (ts->term_flags & USE_BLINK_AS_BRIGHT_BG) {
@@ -1177,7 +1177,7 @@
(rgb >> 16) & 255, (rgb >> 8) & 255,
(rgb >> 0) & 255);
} else
#endif
- if (ts->term_fg_colors_count > 16) {
+ if (ts->term_fg_colors_count > 16 && fgcolor >= 16) {
TTY_FPRINTF(s->STDOUT, "\033[38;5;%dm", fgcolor);
} else
if (ts->term_flags & USE_BOLD_AS_BRIGHT_FG) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemacs-commit] qemacs qe.c tty.c,
Charlie Gordon <=