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

已回答

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

Hi,

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

0

请先登录再写评论。