public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Thomas Wolff <towo@towo.net>
To: cygwin@cygwin.com
Subject: Re: Fw: When scrolling through history in cygwin terminal window line gets garbled
Date: Fri, 17 Aug 2018 16:26:00 -0000	[thread overview]
Message-ID: <8098c8d2-38ab-0fc0-5eea-8d7009b821e8@towo.net> (raw)
In-Reply-To: <1179039299.9023936.1534512963906@mail.yahoo.com>

Am 17.08.2018 um 15:36 schrieb surendar jeyadev via cygwin:
> I am having a similar issue to that pictorially shown here:
>
>      
> https://unix.stackexchange.com/questions/344502/when-scrolling-through-history-in-cygwin-terminal-window-line-gets-garbled
>
>
> This is new to me as I have been using Cygwin on a Windows 7
>
> machine for several years without encountering this problem.
>
> (Of course, that Cygwin build was from 5 or 6 years back.)
> I just moved to a Windows 10 machine and installed Cygwin from scratch a couple of days back and ran into the issue.
>
> Using the UP arrow to go up the history list, I have no problem till I hit a long command (in the case shown below the problematic command was about 50 characters long). When going one step further up the history list, the leading characters of the long command stay on the command line. I cannot backspace/delete them.
>
> I am using mintty from the standard distribution.
>
> Specific example. I issue a 'history' command to show the
>
> history and then use the UP arrow key to scroll upwards. After 6 Ups, I reach command no. 33 as shown below.
>
> ================================
> sita 41 $  history
>      2  vi .bash_profile
>      3  quit
>      4  eixt
>      5  exit
>      6  histoyr
>      7  history
>      8  vi .bash_profile
>      9  vi .bash_profile
>     10  exit
>     11  history
>     12  cd /usr/share
>     13  ls
>     14  cd
>     15  history
>     16  exit
>     17  history
>     18  history
>     19  exit
>     20  sdafasfas
>     21  history
>     22  cp /usr/share/vim/vim*/vimrc_example.vim ~/.vimrc
>     23  history
>     24  cp /usr/share/vim/vim*/vimrc_example.vim ~/.vimrc
>     25  history
>     26  ls
>     27  cd
>     28  vi .bash_profile
>     29  exit
>     30  history
>     31  exit
>     32  cygcheck -s -v -r > cygcheck.out
>     33  history
>     34  history
>     35  ls
>     36  cd
>     37  pwd
>     38  ls
>     39  history
>     40  exit
>     41  history
> sita 42 $  history
> ================================
>
> Now I move up one more step an get
>
> ================================
> ....
> ....
> 30  history
>     31  exit
>     32  cygcheck -s -v -r > cygcheck.out
>     33  history
>     34  history
>     35  ls
>     36  cd
>     37  pwd
>     38  ls
>     39  history
>     40  exit
>     41  history
> sita 42 $  cygcheck -s -v -r > cygcheck.out
> ================================
>
> which is just what is expected. One more and we get
>
> ================================
>     31  exit
>     32  cygcheck -s -v -r > cygcheck.out
>     33  history
>     34  history
>     35  ls
>     36  cd
>     37  pwd
>     38  ls
>     39  history
>     40  exit
>     41  history
> sita 42 $  cygcheckexit
> ================================
>
> Command 31 (exit) now has the extra characters pre-pending the entry on the history list.
>
> Hitting a return here executes the 'exit', though.
> This seems to work for other commands. It appears as though the characters have no effect. But, they do cause a bit of confusion!
>
> Also I noticed that if I input a really long string for a command, the characters that should be in a new line over write the leading characters of the command -- that is, there is no line feed when the text wraps around.
>
> Would greatly appreciate any help in fixing this.
>
> The 'cygcheck' output is attached.
>
> If you need any further information about the mintty set up, please let me know.
>
> tia.
Please test the following:
* Set you prompt to some basic string, e.g. PS1=%. Does that change 
anything?
* Mintty 2.7.5 changed the default wraparound behaviour to become 
compatible with the xterm default. With setting -o OldWrapModes=true, 
does that change anything?
* Can you cross-test this in xterm?
* Does it happen in a freshly-started mintty? If it only happens later, 
which programs did you run in the meantime?
* Make a screen log demonstrating a minimal test case, please.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

  reply	other threads:[~2018-08-17 14:37 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1372072396.8455798.1534430210374.ref@mail.yahoo.com>
     [not found] ` <1372072396.8455798.1534430210374@mail.yahoo.com>
2018-08-17 15:20   ` surendar jeyadev via cygwin
2018-08-17 16:26     ` Thomas Wolff [this message]
2018-08-18 12:36       ` Steven Penny
2018-08-18 14:17         ` cyg Simple
2018-08-18 22:20           ` Steven Penny
2018-08-19  1:27             ` cyg Simple
2018-08-19  9:50               ` Steven Penny
2018-08-19 10:19                 ` cyg Simple
2018-08-19 14:33                   ` Steven Penny
2018-08-20 14:40                     ` cyg Simple
2018-08-19 15:41                 ` Thomas Wolff
2018-08-19 21:04                   ` Steven Penny
2018-08-19 21:45                 ` Jeffrey Walton
2018-08-19 15:17     ` Fw: When " Andrey Repin
2018-08-19 16:35       ` Thomas Wolff
2018-08-20  6:23         ` Andrey Repin
2018-08-20 16:47           ` Csaba Raduly
2018-08-20 17:11             ` Marco Atzeri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8098c8d2-38ab-0fc0-5eea-8d7009b821e8@towo.net \
    --to=towo@towo.net \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).