Hide line number bar button when code is folded

已回答

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

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

请先登录再写评论。