SimpleTextAttributes (@NotNull TextChunk textChunk) { SimpleTextAttributes at = textChunk.getSimpleAttributesIgnoreBackground(); boolean highlighted = at.getFontStyle() == Font.BOLD; return highlighted ? new SimpleTextAttributes(null, at.getFgColor(), at.getWaveColor(), at.getStyle() & ~SimpleTextAttributes.STYLE_BOLD | SimpleTextAttributes.STYLE_SEARCH_MATCH) : at; }