Fix PHP highlighting

This commit is contained in:
Tim Warren 2015-04-28 12:09:06 -04:00
parent de0a51cf05
commit a5da4634ce
3 changed files with 11 additions and 11 deletions

File diff suppressed because one or more lines are too long

View File

@ -51,7 +51,7 @@
"value": [0, 43, 54], "value": [0, 43, 54],
"preprocessor": [88, 110, 117], "preprocessor": [88, 110, 117],
"script": [88, 110, 117], "script": [88, 110, 117],
"variable": [203, 75, 22], "variable": [181, 137, 0],
"error": [220, 50, 47] "error": [220, 50, 47]
}, },
"bold": { "bold": {

View File

@ -77,6 +77,7 @@ void EditPane::Highlight(wxString filePath)
} }
// Some basic properties to set // Some basic properties to set
this->SetStyleBits(8);
this->SetProperty("technology", "2"); this->SetProperty("technology", "2");
this->SetProperty("error.inline", "0"); this->SetProperty("error.inline", "0");
this->SetProperty("styling.within.preprocessor", "1"); this->SetProperty("styling.within.preprocessor", "1");
@ -150,12 +151,7 @@ void EditPane::ApplyTheme(string lang, string theme)
wxLogDebug(output.str().c_str()); wxLogDebug(output.str().c_str());
} }
if (lang == "php") int offset_count = (lang == "php") ? 103 : 0;
{
//this->SetLexerLanguage("php");
}
int offset_count = (lang == "php") ? 104 : 0;
// Do the appropriate mappings to load the selected theme // Do the appropriate mappings to load the selected theme
this->_ApplyTheme(lexer_map, offset_count); this->_ApplyTheme(lexer_map, offset_count);
@ -463,14 +459,12 @@ void EditPane::_ApplyTheme(JsonValue lexer_map, int addtoi)
if ( ! this->GetThemeValue("foreground", key).isNull()) if ( ! this->GetThemeValue("foreground", key).isNull())
{ {
this->StyleSetForeground(i, this->GetThemeColor("foreground", key)); this->StyleSetForeground(i, this->GetThemeColor("foreground", key));
wxLogDebug("Set foreground color for %s token type, on value: %i", key, i);
} }
// Set the background color, if it exists // Set the background color, if it exists
if ( ! this->GetThemeValue("background", key).isNull()) if ( ! this->GetThemeValue("background", key).isNull())
{ {
this->StyleSetBackground(i, this->GetThemeColor("background", key)); this->StyleSetBackground(i, this->GetThemeColor("background", key));
wxLogDebug("Set background color for %s token type, on value: %i", key, i);
} }
// Set bold, if it applies // Set bold, if it applies