mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Show malformed match result “warning” with correct font size
This commit is contained in:
@@ -271,11 +271,10 @@ static NSAttributedString* AttributedStringForMatch (std::string const& text, si
|
||||
|
||||
if(!utf8::is_valid(prefix.begin(), prefix.end()) && utf8::is_valid(middle.begin(), middle.end()) && utf8::is_valid(suffix.begin(), suffix.end()))
|
||||
{
|
||||
ns::attr_string_t res;
|
||||
res = ns::attr_string_t([NSColor darkGrayColor])
|
||||
<< ns::style::line_break(NSLineBreakByTruncatingTail)
|
||||
<< text::format("%zu-%zu: Range is not valid UTF-8, please contact: http://macromates.com/support", m.first, m.last);
|
||||
return res.get();
|
||||
return ns::attr_string_t()
|
||||
<< [NSColor darkGrayColor] << [NSFont systemFontOfSize:11]
|
||||
<< ns::style::line_break(NSLineBreakByTruncatingTail)
|
||||
<< text::format("%zu-%zu: Range is not valid UTF-8, please contact: http://macromates.com/support", m.first, m.last);
|
||||
}
|
||||
|
||||
return AttributedStringForMatch(prefix + middle + suffix, prefix.size(), prefix.size() + middle.size(), m.line_number);
|
||||
|
||||
Reference in New Issue
Block a user