diff options
author | rodrigc <rodrigc@FreeBSD.org> | 2005-09-17 12:52:04 +0000 |
---|---|---|
committer | rodrigc <rodrigc@FreeBSD.org> | 2005-09-17 12:52:04 +0000 |
commit | c186ba9bf2bbc558f70907815feac9265d973ead (patch) | |
tree | 1b5d3de7aa0a5a1d9dd1c85752634243e90eef95 /usr.sbin/vidcontrol | |
parent | e802c1532268eda422156a9ec89178be9bc05772 (diff) | |
download | FreeBSD-src-c186ba9bf2bbc558f70907815feac9265d973ead.zip FreeBSD-src-c186ba9bf2bbc558f70907815feac9265d973ead.tar.gz |
Fix so that color changes are not lost when the video mode changes.
PR: bin/83553
Submitted by: Dan Lukes <dan at obluda dot cz>
Diffstat (limited to 'usr.sbin/vidcontrol')
-rw-r--r-- | usr.sbin/vidcontrol/vidcontrol.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/usr.sbin/vidcontrol/vidcontrol.c b/usr.sbin/vidcontrol/vidcontrol.c index 9d9e95c..eb307a3 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; } } } |