termcap "me" does not reset the alternate character set
This commit is contained in:
parent
d5b2c9dc99
commit
bcfa7fb731
|
@ -1,3 +1,7 @@
|
|||
2017-03-30 Markus Gans <guru.mail@muenster.de>
|
||||
* Fixed bug: termcap "me" does not reset
|
||||
the alternate character set
|
||||
|
||||
2017-03-28 Markus Gans <guru.mail@muenster.de>
|
||||
* Improved graphic charset pairs (vt100)
|
||||
for FreeBSD console
|
||||
|
|
|
@ -529,18 +529,26 @@ char* FOptiAttr::changeAttribute (char_data*& term, char_data*& next)
|
|||
|
||||
if ( hasNoAttribute(next) )
|
||||
{
|
||||
if ( off.pc_charset )
|
||||
unsetTermPCcharset(term);
|
||||
|
||||
if ( off.alt_charset )
|
||||
unsetTermAltCharset(term);
|
||||
|
||||
if ( hasAttribute(term) )
|
||||
{
|
||||
if ( F_exit_attribute_mode.cap )
|
||||
{
|
||||
unsetTermAttributes(term);
|
||||
|
||||
if ( off.pc_charset )
|
||||
unsetTermPCcharset(term);
|
||||
|
||||
if ( off.alt_charset )
|
||||
unsetTermAltCharset(term);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( off.pc_charset )
|
||||
unsetTermPCcharset(term);
|
||||
|
||||
if ( off.alt_charset )
|
||||
unsetTermAltCharset(term);
|
||||
|
||||
if ( off.bold )
|
||||
unsetTermBold(term);
|
||||
|
||||
|
@ -579,11 +587,8 @@ char* FOptiAttr::changeAttribute (char_data*& term, char_data*& next)
|
|||
if ( colorChange(term, next) )
|
||||
change_color (term, next);
|
||||
}
|
||||
else if ( F_set_attributes.cap )
|
||||
else if ( F_set_attributes.cap && ! term->pc_charset )
|
||||
{
|
||||
if ( off.pc_charset )
|
||||
unsetTermPCcharset(term);
|
||||
|
||||
if ( switchOn() || switchOff() )
|
||||
setTermAttributes ( term
|
||||
, next->standout
|
||||
|
@ -596,6 +601,9 @@ char* FOptiAttr::changeAttribute (char_data*& term, char_data*& next)
|
|||
, next->protect
|
||||
, next->alt_charset );
|
||||
|
||||
if ( off.pc_charset )
|
||||
unsetTermPCcharset(term);
|
||||
|
||||
if ( next->italic )
|
||||
setTermItalic(term);
|
||||
|
||||
|
@ -676,12 +684,12 @@ char* FOptiAttr::changeAttribute (char_data*& term, char_data*& next)
|
|||
|
||||
detectSwitchOn (term, next);
|
||||
|
||||
if ( on.pc_charset )
|
||||
setTermPCcharset(term);
|
||||
|
||||
if ( on.alt_charset )
|
||||
setTermAltCharset(term);
|
||||
|
||||
if ( on.pc_charset )
|
||||
setTermPCcharset(term);
|
||||
|
||||
if ( on.bold )
|
||||
setTermBold(term);
|
||||
|
||||
|
|
|
@ -2545,17 +2545,17 @@ inline void FVTerm::charsetChanges (char_data*& next_char)
|
|||
return;
|
||||
|
||||
uInt code = uInt(next_char->code);
|
||||
uInt ch = charEncode(code);
|
||||
uInt ch_enc = charEncode(code);
|
||||
|
||||
if ( ch != code )
|
||||
if ( ch_enc != code )
|
||||
{
|
||||
if ( ch == 0 )
|
||||
if ( ch_enc == 0 )
|
||||
{
|
||||
next_char->code = int(charEncode(code, fc::ASCII));
|
||||
return;
|
||||
}
|
||||
|
||||
next_char->code = int(ch);
|
||||
next_char->code = int(ch_enc);
|
||||
|
||||
if ( Encoding == fc::VT100 )
|
||||
next_char->alt_charset = true;
|
||||
|
@ -2563,7 +2563,7 @@ inline void FVTerm::charsetChanges (char_data*& next_char)
|
|||
{
|
||||
next_char->pc_charset = true;
|
||||
|
||||
if ( isXTerminal() && hasUTF8() && ch < 0x20 ) // Character 0x00..0x1f
|
||||
if ( isXTerminal() && hasUTF8() && ch_enc < 0x20 ) // Character 0x00..0x1f
|
||||
next_char->code = int(charEncode(code, fc::ASCII));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue