File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -398,6 +398,19 @@ reading input from a TTY stream. The position of cursor determines the
398398portion of the input string that will be modified as input is processed,
399399as well as the column where the terminal caret will be rendered.
400400
401+ ### rl.getCursorPos()
402+ <!-- YAML
403+ added: REPLACEME
404+ -->
405+
406+ * Returns: {Object}
407+ * ` rows ` {number} the row of the prompt the cursor currently lands on
408+ * ` cols ` {number} the screen column the cursor currently lands on
409+
410+ Returns the real position of the cursor in relation to the input
411+ prompt + string. Long input (wrapping) strings, as well as multiple
412+ line prompts are included in the calculations.
413+
401414## readline.clearLine(stream, dir\[ , callback\] )
402415<!-- YAML
403416added: v0.7.7
You can’t perform that action at this time.
0 commit comments