Get text from visible area in document of my editor intellij ide

Answered

How to  get text from the from the visible area in the current open document in intellij. Suppose current caret is at 18th line and last line that is visible is  56th line in the doc(though the doc has 100 lines) , all the contents show get selected. I tried using editor. Getscrollingmodel(). Getvisiblearea() But it return rectangle but I need  textRangetextRange

0
1 comment

Hi,

Please check com.intellij.openapi.editor.Editor#calculateVisibleRange.

0

Please sign in to leave a comment.