Hide gutter in diff

Answered

Hi,

I'm wanting to hide a line marker / gutter icon when the diff window is open. Is there a way inside LineMarkerProvider to find out if the element passed into getLineMarkerInfo is from a diff window ?

1
2 comments

You can use "rangeHighlighter.setEditorFilter(MarkupEditorFilterFactory.createIsNotDiffFilter());".
Or directly check for "com.intellij.openapi.diff.impl.DiffUtil#isDiffEditor(Editor)".

0

Thanks, I ended up creating a subclass of LineMarkerInfo that overrides getEditorFilter to return the MarkupEditorFilterFactory.createIsNotDiffFilter

0

Please sign in to leave a comment.