[BUG_FIXED] (Author: Andreas Jonsson) Fix two logic errors.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@932 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
8d4f1a36c5
commit
1eda47d56c
@ -3893,7 +3893,7 @@ void NppParameters::feedScintillaParam(TiXmlNode *node)
|
|||||||
nm = element->Attribute(TEXT("borderWidth"), &val);
|
nm = element->Attribute(TEXT("borderWidth"), &val);
|
||||||
if (nm)
|
if (nm)
|
||||||
{
|
{
|
||||||
if (val > 0 || val <= 30)
|
if (val >= 0 && val <= 30)
|
||||||
_svp._borderWidth = val;
|
_svp._borderWidth = val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2264,7 +2264,11 @@ pair<int, int> ScintillaEditView::getSelectionLinesRange() const
|
|||||||
range.first = execute(SCI_LINEFROMPOSITION, start);
|
range.first = execute(SCI_LINEFROMPOSITION, start);
|
||||||
range.second = execute(SCI_LINEFROMPOSITION, end);
|
range.second = execute(SCI_LINEFROMPOSITION, end);
|
||||||
if (range.first > range.second)
|
if (range.first > range.second)
|
||||||
range.swap(range);
|
{
|
||||||
|
int temp = range.first;
|
||||||
|
range.first = range.second;
|
||||||
|
range.second = temp;
|
||||||
|
}
|
||||||
return range;
|
return range;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user