I'm a very experienced node.js developer, but not very experienced ANSI terminal developer.
How do I determine the current location of the cursor?
I see that I can determine the window size with process.stdout.columns, process.stdout.rows, and there's a nifty resize event. Awesome.
But there isn't a process.stdout.column and process.stdout.row or process.stdeout.x, process.stdeout.y to tell me where I currently am, which kind of stinks.
Is there a technical reason as to why this isn't available? Or is it just not documented? Or does it need some love and a pull request?
Practical Use Case
I've got a websocket checking on some stuff in the background. Every few seconds it updates a status message in known location the upper right corner. The function should check to see where the cursor is, make the update, and put the cursor back where it was.
I'm a very experienced node.js developer, but not very experienced ANSI terminal developer.
How do I determine the current location of the cursor?
I see that I can determine the window size with
process.stdout.columns,process.stdout.rows, and there's a niftyresizeevent. Awesome.But there isn't a
process.stdout.columnandprocess.stdout.roworprocess.stdeout.x,process.stdeout.yto tell me where I currently am, which kind of stinks.Is there a technical reason as to why this isn't available? Or is it just not documented? Or does it need some love and a pull request?
Practical Use Case
I've got a websocket checking on some stuff in the background. Every few seconds it updates a status message in known location the upper right corner. The function should check to see where the cursor is, make the update, and put the cursor back where it was.