Tuesday, 6 August 2019

readline.Interface._getCursorPos always returns 0, 0

I'm currently learning to build interactive CLIs with Node. I'm trying to get the cursor position when a user hits enter and using the private (private at least according to Type script) to do this with the readline library. I saw the usage of the private function in Inquirer and given its huge number of weekly downloads I figured that they weren't going to change it anytime soon. However, this function always seems to return 0 - 0.Anyone have any ideas? https://github.com/davemackintosh/foldable-cli/blob/master/index.ts#L31

Submitted August 06, 2019 at 07:29PM by davemackintosh

No comments:

Post a Comment