[BUG_FIXED] (Author: Andreas Jonsson) Fix the bug that "backslash is escape char for SQL" setting is not saved correctly.
[BUG_FIXED] (Author: Andreas Jonsson) Fix the bug that user cannot disable "backslash is SQL escape char" without restarting. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1263 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
4479476230
commit
b3abee8824
@ -4552,10 +4552,10 @@ void NppParameters::feedGUIParameters(TiXmlNode *node)
|
||||
_nppGUI._fileSwitcherWithoutExtColumn = true;
|
||||
}
|
||||
|
||||
optName = element->Attribute(TEXT("backSlashIsEscapeCharacterForSql"));
|
||||
if (optName && !lstrcmp(optName, TEXT("yes")))
|
||||
const TCHAR * optNameBackSlashEscape = element->Attribute(TEXT("backSlashIsEscapeCharacterForSql"));
|
||||
if (optNameBackSlashEscape && !lstrcmp(optNameBackSlashEscape, TEXT("no")))
|
||||
{
|
||||
_nppGUI._backSlashIsEscapeCharacterForSql = true;
|
||||
_nppGUI._backSlashIsEscapeCharacterForSql = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5297,8 +5297,8 @@ bool NppParameters::writeGUIParams()
|
||||
const TCHAR * pStr = _nppGUI._fileSwitcherWithoutExtColumn?TEXT("yes"):TEXT("no");
|
||||
element->SetAttribute(TEXT("fileSwitcherWithoutExtColumn"), pStr);
|
||||
|
||||
pStr = _nppGUI._backSlashIsEscapeCharacterForSql?TEXT("yes"):TEXT("no");
|
||||
element->SetAttribute(TEXT("backSlashIsEscapeCharacterForSql"), pStr);
|
||||
const TCHAR * pStrBackSlashEscape = _nppGUI._backSlashIsEscapeCharacterForSql ? TEXT("yes") : TEXT("no");
|
||||
element->SetAttribute(TEXT("backSlashIsEscapeCharacterForSql"), pStrBackSlashEscape);
|
||||
}
|
||||
else if (!lstrcmp(nm, TEXT("sessionExt")))
|
||||
{
|
||||
|
@ -715,8 +715,8 @@ protected:
|
||||
|
||||
|
||||
void setSqlLexer() {
|
||||
if(NppParameters::getInstance()->getNppGUI()._backSlashIsEscapeCharacterForSql)
|
||||
execute(SCI_SETPROPERTY, (WPARAM)"sql.backslash.escapes", (LPARAM)"1");
|
||||
const bool kbBackSlash = NppParameters::getInstance()->getNppGUI()._backSlashIsEscapeCharacterForSql;
|
||||
execute(SCI_SETPROPERTY, (WPARAM)"sql.backslash.escapes", kbBackSlash ? (LPARAM)"1" : (LPARAM)"0");
|
||||
setLexer(SCLEX_SQL, L_SQL, LIST_0);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user