Hide line number bar button when code is folded

Answered

I developed an idea plug-in that adds a custom line number bar button "+" to each line of the opened file, but when the code is folded, this button does not hide automatically. What should I do?

0
1 comment

Hello. Apparently you should take into an account visual lines, not only logical lines.

So instead of adding a line marker to each and every line, you should add it to each visual line only, once.

Please see com.intellij.openapi.editor.Editor#logicalToVisualPosition for how to convert logical lines to visual lines.

0

Please sign in to leave a comment.