mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-06-01 10:34:05 +02:00
Added getLineText
This commit is contained in:
parent
2e39021e38
commit
6d361653eb
@ -400,4 +400,15 @@ public class EditorHelper
|
|||||||
LogicalPosition pos = editor.offsetToLogicalPosition(offset);
|
LogicalPosition pos = editor.offsetToLogicalPosition(offset);
|
||||||
return editor.getDocument().getLineEndOffset(pos.line);
|
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));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user