From 35e87d37d4c64a2ce476a9fe385b80bade1235af Mon Sep 17 00:00:00 2001 From: "Alexander S. Aganichev" Date: Sun, 4 Nov 2001 21:37:03 +0000 Subject: [PATCH] Do not use stylies within selection --- golded3/geedit.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/golded3/geedit.cpp b/golded3/geedit.cpp index c1411dd..6cb2a5d 100644 --- a/golded3/geedit.cpp +++ b/golded3/geedit.cpp @@ -293,7 +293,10 @@ void IEclass::dispstring(const char* __string, uint __row, int attr, Line* line) savechar = _buf[endblock]; _buf[endblock] = NUL; + bool oldusestylies = CFG->usestylies; + CFG->usestylies = false; StyleCodeHighlight(_buf+begblock, __row, mincol+begblock, false, C_READA); + CFG->usestylies = oldusestylies; _buf[endblock] = savechar; StyleCodeHighlight(_buf+endblock, __row, mincol+endblock, false, attr); } @@ -302,12 +305,24 @@ void IEclass::dispstring(const char* __string, uint __row, int attr, Line* line) char savechar = _buf[blockmark]; _buf[blockmark] = NUL; + bool oldusestylies = CFG->usestylies; + if(selected) + CFG->usestylies = false; StyleCodeHighlight(_buf, __row, mincol, false, selected ? C_READA : attr); + CFG->usestylies = oldusestylies; _buf[blockmark] = savechar; + if(not selected) + CFG->usestylies = false; StyleCodeHighlight(_buf+blockmark, __row, mincol+blockmark, false, selected ? attr : C_READA); + CFG->usestylies = oldusestylies; } - else + else { + bool oldusestylies = CFG->usestylies; + if(selected) + CFG->usestylies = false; StyleCodeHighlight(_buf, __row, mincol, false, selected ? C_READA : attr); + CFG->usestylies = oldusestylies; + } } else StyleCodeHighlight(_buf, __row, mincol, false, attr);