mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Fix update of misspelled ranges
If nothing was misspelled in the updated range, and a value existed for the end of the range (indicating that what followed the updated range was misspelled) then that value would be erased.
This commit is contained in:
@@ -68,7 +68,11 @@ namespace ng
|
||||
}
|
||||
|
||||
// TODO We should delay checking to the misspellings function. This way we won’t spell check entire document on load etc.
|
||||
_misspellings.remove(_misspellings.lower_bound(from), _misspellings.upper_bound(to));
|
||||
auto fromIter = _misspellings.lower_bound(from);
|
||||
auto toIter = _misspellings.upper_bound(to);
|
||||
if(fromIter != toIter && fromIter->first >= to && fromIter->second)
|
||||
fromIter = toIter;
|
||||
_misspellings.remove(fromIter, toIter);
|
||||
iterate(r, ranges)
|
||||
{
|
||||
std::string const& text = buffer->substr(r->first, r->second);
|
||||
|
||||
Reference in New Issue
Block a user