diff options
author | nyamatongwe <devnull@localhost> | 2013-04-15 20:35:22 +1000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2013-04-15 20:35:22 +1000 |
commit | 0378e8f8497c8408400f125607160e0fe707f13b (patch) | |
tree | 7b42c781bd59b1b05bec5212d03bbebd04368326 /src | |
parent | 7d7d3d61d6c663aa1a416027ef9a7fc98559ccb0 (diff) | |
download | scintilla-mirror-0378e8f8497c8408400f125607160e0fe707f13b.tar.gz |
Existing code fills 0 length ranges and ranges after document end so simply
return instead of throwing exceptions.
Diffstat (limited to 'src')
-rw-r--r-- | src/RunStyles.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/RunStyles.cxx b/src/RunStyles.cxx index b74053e75..82d924a23 100644 --- a/src/RunStyles.cxx +++ b/src/RunStyles.cxx @@ -116,11 +116,11 @@ int RunStyles::EndRun(int position) { bool RunStyles::FillRange(int &position, int value, int &fillLength) { if (fillLength <= 0) { - throw std::invalid_argument("RunStyles::FillRange <= 0 length."); + return false; } int end = position + fillLength; if (end > Length()) { - throw std::invalid_argument("RunStyles::FillRange length goes past end."); + return false; } int runEnd = RunFromPosition(end); if (styles->ValueAt(runEnd) == value) { |