[BUG_FIXED] Fix the bug that ] and } don't be skipped if "auto-insert ()" is disabled.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1309 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
1ebef477cc
commit
88a8889c15
@ -554,16 +554,27 @@ void AutoCompletion::insertMatchedChars(int character, const MatchedPairConf & m
|
||||
case int(')') :
|
||||
case int(']') :
|
||||
case int('}') :
|
||||
if (matchedPairConf._doParentheses && !_insertedMatchedChars.isEmpty())
|
||||
if (!_insertedMatchedChars.isEmpty())
|
||||
{
|
||||
char startChar;
|
||||
if (character == int(')'))
|
||||
{
|
||||
if (!matchedPairConf._doParentheses)
|
||||
return;
|
||||
startChar = '(';
|
||||
}
|
||||
else if (character == int(']'))
|
||||
{
|
||||
if (!matchedPairConf._doBrackets)
|
||||
return;
|
||||
startChar = '[';
|
||||
}
|
||||
else // if (character == int('}'))
|
||||
{
|
||||
if (!matchedPairConf._doCurlyBrackets)
|
||||
return;
|
||||
startChar = '{';
|
||||
|
||||
}
|
||||
int pos = _insertedMatchedChars.search(startChar, char(character), caretPos);
|
||||
if (pos != -1)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user