1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2025-05-10 03:34:06 +02:00

Added getLineText

This commit is contained in:
rmaddy 2003-04-22 18:07:26 +00:00
parent 2e39021e38
commit 6d361653eb

View File

@ -400,4 +400,15 @@ public class EditorHelper
LogicalPosition pos = editor.offsetToLogicalPosition(offset);
return editor.getDocument().getLineEndOffset(pos.line);
}
/**
* Returns the text of the requested logical line
* @param editor The editor
* @param lline The logical line to get the text for
* @return The requested line
*/
public static String getLineText(Editor editor, int lline)
{
return getText(editor, getLineStartOffset(editor, lline), getLineEndOffset(editor, lline));
}
}