This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: text cursor is not being positioned


References: <5EBF47293E902F4AAB62FE0A0C84E59A53D935@exunz175ttw02.oceania.corp.anz.com>

John Lewis wrote:
My text cursor is not being positioned correctly. This is a fresh
install of 1.7.1-1 onto Microsoft Windows XP Professional, Service Pack
2.
 In the bash shell the backspace key doesn't back up and overwrite the
last character, same with ctrl-U, the line remains on the screen, with
the cursor at the end.
 The key strokes are being recognised, the characters have been removed
from the input buffer correctly.
I have the same issue with other tools, less and vi are unable to paint
the screen correctly, and the up arrow at the command line just appends
the history to the end of the current line.
 Well, for some reason control sequences are being ignored, but I've
got no idea why that might be. So here's a bunch of questions:
 How do you invoke bash? Are you sure you're running the Cygwin
versions of bash, vi and less? Have you got any stty commands or
printing of escape sequences in your bash startup files? Have you
customised the prompt (i.e. the PS1 variable)?
 Also, cygcheck output might give a clue; please see

Problem reports: Â Â Â http://cygwin.com/problems.html
Andy


From: John Lewis (but a different mail account)


Andy Koppe, Bengt-Arne Fjellner, thanks for the replies. My apologies for the new e-mail, I have subscribed to the mail list so that I can reply properly in the future. My corporate account insists on attaching a privacy paragraph and I can't subscribe from work.

To answer your questions:

This is a fresh install, with no modifications (I haven't even run mkpasswd yet).

I start bash with the desktop icon created during the installation, the bat file has not been modified, it does a cd to the \bin then "bash --login -i". The .bashrc files are untouched and contain only comments.

Bash is definitely Cygwin version, I have no other. I mentioned less and vim only to show the scope of the problem, I expect they'll work correctly once the backspace issue is fixed.

Here is my PS1 prompt:

\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$

I tried changing the PS1 prompt to 'x' but this didn't change the behaviour.

I've run "cygcheck -k", all keystrokes are seen and seem to have correct values (backspace gives VK:0x08 VS: 0x0e A: 0x08)

and also "cygcheck -s -v -r", see attached.

I think this is a clue. I did this: "cat - > fred". The keyboard functions correctly.
! !
O
Backspace works, ctrl-U clears the line, no erased characters are in the file. Even the up arrow moves the cursor up a line. When used without redirection the echoed lines are correct.


again, thanks for your help.

Attachment: cygcheck.out
Description: Binary data

--
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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]