This is the mail archive of the
mailing list for the Cygwin project.
Re: base-[files|password] for 1.7
On Wed, Jul 30, 2008 at 11:23:10AM +0200, Corinna Vinschen wrote:
>On Jul 29 21:39, Christopher Faylor wrote:
>> On Tue, Jul 29, 2008 at 01:59:54PM -0400, Christopher Faylor wrote:
>> >On Tue, Jul 29, 2008 at 05:18:32PM +0100, John Morrison wrote:
>> >>On Tue, July 29, 2008 3:57 pm, Corinna Vinschen wrote:
>> >>> On Jul 29 10:31, Christopher Faylor wrote:
>> >>>> On Tue, Jul 29, 2008 at 02:29:19PM +0200, Corinna Vinschen wrote:
>> >>>> >Chris, is there any good reason NOT to call send_winch_maybe on
>> >>>> >a key event?
>> >>>> It only makes sense when there is a mouse event.
>> >>> I don't understand that. Mouse events typically don't happen. I can
>> >>> use the mouse as much as I want in a console window running vim, vim
>> >>> never gets the SIGWINCH.
>> >>>> It would make more
>> >>>> sense to move the handling of SIGWINCH into the signal handler so that
>> >>>> the above works transparently. I'll look into doing that.
>> >>> That would be a nice addition.
>> >>So I don't need to add anything to /etc/profile?
>> >Adding the kill -WINCH still makes sense. It will at least get things
>> >working for xterm and rxvt.
>> Ok. I'm confused. If I perform a "kill -SIGWINCH <pid>" on a bash
>> which is opened in a console window, the right number of lines shows up.
>> They also show up when you change the size of the window.
>> So it seems like this is working correctly without any Cygwin
>Doesn't work for me. kill -WINCH $$ creates the LINES and COLUMNS
>values, but any later windows resize doesn't change the values. And as
>mentioned before it also doesn't work in vim. Adding send_winch_maybe()
>to the KEY_EVENT at least changes it at the next keypress. And there's
>no such thing as a mouse event, whatever I do with the mouse.
L:\Documents and Settings\cgf>bash
bash-3.2$ echo $LINES
bash-3.2$ echo $LINES # make window bigger
bash-3.2$ echo $LINES # make window even bigger
(also checked with a 4NT console)
Putting a "kill -WINCH $$" in my /home/cgf/.profile file causes LINES to
be set initially when I use "bash -login".
In my version of vim the screen size *does* change after every keypress
just like it always did. I checked this with vim when I implemented it.
If this isn't working for you then fixing the symptom by checking on
every keystroke, slowing down the already slow input processing even
further, is not the correct first solution for handling the problem.
Cygwin does this:
SetConsoleMode (get_io_handle (), ENABLE_WINDOW_INPUT | ENABLE_MOUSE_INPUT);
If you are saying that this is broken in Windows or that it isn't being
properly set in Cygwin then that's what needs to be fixed. Maybe
checking the screen size on every keystroke is the way to do it but,
since everything is working as I designed it for me, I am not yet