Maximus5 / ConEmu

Customizable Windows terminal with tabs, splits, quake-style, hotkeys and more
https://conemu.github.io/
BSD 3-Clause "New" or "Revised" License
8.55k stars 572 forks source link

Buffer contents appear below command line after running nano in ADB shell #851

Open mikeoswego opened 8 years ago

mikeoswego commented 8 years ago

Versions

ConEmu build: 160824 both x32/x64 OS version: Windows 10 x64 Used shell version (Far Manager, git-bash, cmd, powershell, cygwin, whatever): cmd

Problem description

Using ADB shell and running nano on connected phone, nano clears screen and then after exiting nano, the contents of the ConEmu scrollback buffer are below the command input.

Steps to reproduce

  1. Run 'adb shell' while connected to android phone.
  2. Run some commands like ls -la on phone to fill scroll back buffer
  3. Run nano on phone to edit multi-page document (TWRP installer for nano: [http://forum.xda-developers.com/attachment.php?attachmentid=3848796&d=1471715646])
  4. Use CTRL-V, CTRL-Y to page up & down in document, then exit nano
  5. Hit enter key and lines in scroll back buffer start appearing on command line (they are not acted on, just appear.)
  6. Exiting adb shell back to cmd prompt does not clear problem.
  7. Must either close ConEmu or hit enter key repeatedly until offending buffer content lines are scrolled up the screen.
Maximus5 commented 8 years ago

Why do you report adb/nano bug here?

https://conemu.github.io/en/ThirdPartyProblems.html

mikeoswego commented 8 years ago

It is not an adb/nano bug. The problem only exists in ConEmu, not in stock windows cmd console (or ConsoleZ, Console2, etc.)

The problem occurs with both 132x43 80x25/24 ConEmu windows but not in stock windows console at any of those sizes. I have removed ConEmu (along with ConEmu.xml) and reinstalled.

I'm willing to perform further troubleshooting steps. I do understand that if the scenario I've indicated is overly rare that it may not be worth the devs time to troubleshoot this. Somehow, ConEmu is allowing scrollback buffer contents to be placed below the command line while running an app on a remote device via the well known adb interface. The app is not running in ConEmu the remote results are merely being displayed.

Maximus5 commented 8 years ago

Please attach descriptive screenshots: before nano, with nano, after nano. StatusBar with Terminal Modes and console rect must be visible.

mikeoswego commented 8 years ago

These shots were taken after removing conemu.xml to reset defaults and the only change in the default config is the color scheme and disabling CTRL-V in ConEmu so it is available for other uses. Screen-1 shows the initial opening of ConEmu with the "adb shell" command ready to execute. Screen-2 is after hitting enter to run "adb shell". The stock cmd console does not clear the screen and place the adb prompt at the first line. This is not objectionable but thought I'd mention the difference. Screen-3 shows the end of the multi-page output of "ls -la" from the remote device. Screen-4 shows nano being run on the remote device Screen-5 shows the screen after using ctrl-x to close nano on the remote device and then hitting the Enter key 5 times Screen-6 is after screen-5 but after scolling down with the mouse wheel Screen-7 is after exiting from adb and shows the ConEmu prompt with the scroll back buffer contents showing there as well Thanks for looking a little deeper and let me know of any further steps I can take to help.

screen-1 screen-2 screen-3 screen-4 screen-5 screen-6 screen-7

Maximus5 commented 8 years ago

I can't check that at the moment. Just two notes.

  1. By default ConEmu does not show valuable for troubleshooting columns: "Terminal modes", "Console buffer size" and "Console visible rectangle".
  2. I can't believe that the same problem can't be reproduced from cmd.exe started outside of ConEmu.
mikeoswego commented 8 years ago

I've used adb in the windows cmd console for years and just recently tried using ConEmu. Here is the exact same sequence of screen shots as above but running cmd.exe outside of ConEmu:

screen-w-1 screen-w-2 screen-w-3 screen-w-4 screen-w-5 screen-w-6 screen-w-7

mikeoswego commented 8 years ago

And here are the same sequence of screenshots with "Terminal modes", "Console buffer size" and "Console visible rectangle" items enabled in the status bar:

screen-d-1 screen-d-2 screen-d-3 screen-d-4 screen-d-5 screen-d-6 screen-d-7

Maximus5 commented 8 years ago

Your link to nano is invalid (Invalid Attachment specified). Version of adb.exe was not specified.

mikeoswego commented 8 years ago

Nano was updated yesterday to v2.7.0, (previous v2.6.3) here is the new link for TWRP flashable zip: [http://forum.xda-developers.com/attachment.php?attachmentid=3864969&d=1473023111] ADB is v1.0.35 problem is apparent on another box with ADB v1.0.32