Changeset View
Changeset View
Standalone View
Standalone View
src/syntax/katehighlight.cpp
Show First 20 Lines • Show All 455 Lines • ▼ Show 20 Line(s) | |||||
456 | KTextEditor::DefaultStyle KateHighlighting::defaultStyleForAttribute(int attr) const | 456 | KTextEditor::DefaultStyle KateHighlighting::defaultStyleForAttribute(int attr) const | ||
457 | { | 457 | { | ||
458 | return textStyleToDefaultStyle(m_formats[sanitizeFormatIndex(attr)].textStyle()); | 458 | return textStyleToDefaultStyle(m_formats[sanitizeFormatIndex(attr)].textStyle()); | ||
459 | } | 459 | } | ||
460 | 460 | | |||
461 | QString KateHighlighting::nameForAttrib(int attrib) const | 461 | QString KateHighlighting::nameForAttrib(int attrib) const | ||
462 | { | 462 | { | ||
463 | const auto &format = m_formats.at(sanitizeFormatIndex(attrib)); | 463 | const auto &format = m_formats.at(sanitizeFormatIndex(attrib)); | ||
464 | return m_propertiesForFormat.at(sanitizeFormatIndex(attrib))->definition.name() + QLatin1Char(':') + QString(format.isValid() ? format.name() : QLatin1String("Normal")); | 464 | return m_propertiesForFormat.at(sanitizeFormatIndex(attrib))->definition.name() + QLatin1Char(':') + QString(format.isValid() ? format.name() : QStringLiteral("Normal")); | ||
465 | } | 465 | } | ||
466 | 466 | | |||
467 | bool KateHighlighting::isInWord(QChar c, int attrib) const | 467 | bool KateHighlighting::isInWord(QChar c, int attrib) const | ||
468 | { | 468 | { | ||
469 | return !m_propertiesForFormat.at(sanitizeFormatIndex(attrib))->definition.isWordDelimiter(c) | 469 | return !m_propertiesForFormat.at(sanitizeFormatIndex(attrib))->definition.isWordDelimiter(c) | ||
470 | && !c.isSpace() | 470 | && !c.isSpace() | ||
471 | && c != QLatin1Char('"') && c != QLatin1Char('\'') && c != QLatin1Char('`'); | 471 | && c != QLatin1Char('"') && c != QLatin1Char('\'') && c != QLatin1Char('`'); | ||
472 | } | 472 | } | ||
▲ Show 20 Lines • Show All 253 Lines • Show Last 20 Lines |