From ed738581962f41fcc23851fe3d3da0f10e22cb4f Mon Sep 17 00:00:00 2001 From: Markus Gans Date: Wed, 8 Nov 2017 01:00:44 +0100 Subject: [PATCH] Simulate invisible characters on terminals that do not support this attribute --- ChangeLog | 4 ++++ src/foptiattr.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index ca0e2d50..fbd54837 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2017-11-07 Markus Gans + * Simulate invisible characters on terminals that do not + support this attribute + 2017-11-04 Markus Gans * Version 0.4.0 * Change license from GPL v3 to LGPL v3 diff --git a/src/foptiattr.cpp b/src/foptiattr.cpp index 0ee55cb6..98a95dec 100644 --- a/src/foptiattr.cpp +++ b/src/foptiattr.cpp @@ -539,6 +539,10 @@ char* FOptiAttr::changeAttribute (char_data*& term, char_data*& next) if ( ! ( switchOn() || switchOff() || colorChange(term, next) ) ) return 0; + // Simulate invisible characters + if ( ! F_enter_secure_mode.cap && next->attr.bit.invisible ) + next->code = ' '; + if ( cygwin_terminal && (term->fg_color > 7 || term->bg_color > 7) ) { // reset blink and bold mode from colors > 7