question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

node-pty terminals jump to bottom when a .NET Core console app requests for a cursor position

See original GitHub issue

From @tylerl0706 on July 21, 2018 3:13

Environment

  • Environment: VSCode and Hyper
  • OS version: macOS & Fedora 28

Details

node-pty terminals jump to the bottom when a .NET Core console app requests for a cursor position. In other terminals (iterm, terminal.app), it does not.

This only happens on unix/linux OS’s - Windows works as expected.

This is easily reproducible in PowerShell since it’s built on .NET Core.

Steps to reproduce

  1. have PowerShell on unix
  2. hit enter a bunch (until the page starts scrolling)
  3. run this
while ($true) { $null = [Console]::CursorTop; Start-Sleep 1 }
  1. scroll up

Note the use of [Console]::CursorTop which is the cursor query. In .NET Core, this emits the report cursor position ansi escape sequence on unix-like platforms

Actual behavior

The console window jumps down to the prompt

Expected behavior

The console window does not move

Copied from original issue: Microsoft/node-pty#211

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
Tyriarcommented, Jul 24, 2018

@tylerl0706 can you clone my fork, checkout 1579_emit_pos_directly and test if this fixes it by running the demo?

1reaction
TylerLeonhardtcommented, Jul 27, 2018

@Tyriar sorry for the delay! I was heads down on OneWeek 👍

I can confirm that branch fixes the problem 🎉

Read more comments on GitHub >

github_iconTop Results From Across the Web

node-pty terminals jump to bottom when a .NET Core console ...
node-pty terminals jump to the bottom when a .NET Core console app requests for a cursor position. In other terminals (iterm, terminal.app), ...
Read more >
Console.SetCursorPosition(Int32, Int32) Method (System)
If the cursor is at the bottom right character position of the console window, the next write operation causes the console window to...
Read more >
c# - Is it possible to keep portions of the console from scrolling ...
So I'm writing a CLI .NET Core application. The top portion of the image is to stay put whereas the bottom portion is...
Read more >
Brackets Extension Registry
Go to Matching Start/End Tag' menu item to locate and place the cursor on the matching opening or closing bracket. Keywords: brackets tag...
Read more >
desktop icon manager free download - SourceForge
This plugin helps you to use the AWS Command Line Interface (AWS CLI) to start and end sessions to your managed instances. Session...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found