This is the mail archive of the
mailing list for the Cygwin project.
Re: bash 2.05a.0(2) console "misbehaving" on w2k
- From: "Larry Hall (RFK Partners, Inc)" <lhall at rfk dot com>
- To: Greg Fenton <greg_fenton at yahoo dot com>,cygwin at cygwin dot com
- Date: Tue, 08 Jan 2002 13:08:19 -0500
- Subject: Re: bash 2.05a.0(2) console "misbehaving" on w2k
At 11:00 AM 1/8/2002, Greg Fenton wrote:
>I recently upgraded BASH (don't know the previous version I had...).
>Now when I run some programs, BASH misbehaves.
>In particular, I have two programs which stand out:
>Using the command-line P4 to submit, P4 calls vim to edit my
>submission entry. Prior to the upgrade, everything worked flawlessly.
>Now, when in VIM, the console is all messed up. VIM does not
>appear in Command Mode at all. I start off in what appears to
>be Insert Mode, but hitting ESC does not take me into Command Mode.
>At first I thought that it might be VIM, but switching my P4EDITOR
>value to another VI (Watcom VI), I get the exact same (bad) behaviour.
>A second program is one I wrote myself. I have code which clears
>the console (works fine on the W2K "command prompt" consoles), and
>it used to work fine in bash. Since the upgrade, bash now seems
>to have some type of buffering problem. The screen clears, but
>calls to printf(), fflush(stdout) and getch() get all confused.
>Again, the program works fine in the W2K command shell.
>The code I use to clear the screen is below. I need to use code
>which will work in the NT command shell as well as Cygwin's.
>void ConsoleClear( void )
> HANDLE handle;
> CONSOLE_SCREEN_BUFFER_INFO info;
> COORD coord;
> DWORD dwTemp;
> SECURITY_ATTRIBUTES attr;
> attr.nLength = sizeof( attr );
> attr.lpSecurityDescriptor = NULL;
> attr.bInheritHandle = TRUE;
> coord.X = 0;
> coord.Y = 0;
> handle = CreateFile( TEXT("CONOUT$"),
> (HANDLE)0 );
> if( handle != INVALID_HANDLE_VALUE )
> if( GetConsoleScreenBufferInfo( handle, &info ) )
> // Fill the console with the space character starting from
> FillConsoleOutputCharacter( handle, (TCHAR)' ',
> info.dwSize.X * info.dwSize.Y,
> coord, &dwTemp );
> // Put the cursor back the 0,0 position
> SetConsoleCursorPosition( handle, coord );
> CloseHandle( handle );
>Suggestions as to what might be causing this?
Sounds like something or someone reset your TERM variable.
Larry Hall email@example.com
RFK Partners, Inc. http://www.rfk.com
838 Washington Street (508) 893-9779 - RFK Office
Holliston, MA 01746 (508) 893-9889 - FAX
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html