From e4cf6785ef4ae2cfd0d2c630d22b862238fa3758 Mon Sep 17 00:00:00 2001 From: rodrigc Date: Wed, 5 Oct 2005 04:29:59 +0000 Subject: [PATCH] MFC 1.53 Fix so that color changes are not lost when the video mode changes. PR: bin/83553 Submitted by: Dan Lukes Approved by: re (scottl) Reminded by: delphij --- usr.sbin/vidcontrol/vidcontrol.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/usr.sbin/vidcontrol/vidcontrol.c b/usr.sbin/vidcontrol/vidcontrol.c index 9d9e95c4484c..eb307a3fdcdd 100644 --- a/usr.sbin/vidcontrol/vidcontrol.c +++ b/usr.sbin/vidcontrol/vidcontrol.c @@ -715,11 +715,14 @@ get_normal_colors(int argc, char **argv, int *_index) if (*_index < argc && (color = get_color_number(argv[*_index])) != -1) { (*_index)++; fprintf(stderr, "\033[=%dF", color); + normal_fore_color=color; + colors_changed = 1; if (*_index < argc && (color = get_color_number(argv[*_index])) != -1 && color < 8) { (*_index)++; fprintf(stderr, "\033[=%dG", color); + normal_back_color=color; } } } @@ -736,11 +739,14 @@ get_reverse_colors(int argc, char **argv, int *_index) if ((color = get_color_number(argv[*(_index)-1])) != -1) { fprintf(stderr, "\033[=%dH", color); + revers_fore_color=color; + colors_changed = 1; if (*_index < argc && (color = get_color_number(argv[*_index])) != -1 && color < 8) { (*_index)++; fprintf(stderr, "\033[=%dI", color); + revers_back_color=color; } } }