NetBSD Problem Report #43839
From mrg@eterna.com.au Sat Sep 4 02:38:23 2010
Return-Path: <mrg@eterna.com.au>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 5E15863BC5B
for <gnats-bugs@gnats.NetBSD.org>; Sat, 4 Sep 2010 02:38:23 +0000 (UTC)
Message-Id: <20100904023818.668F23752B@splode.eterna.com.au>
Date: Sat, 4 Sep 2010 12:38:18 +1000 (EST)
From: mrg@eterna.com.au
Reply-To: mrg@eterna.com.au
To: gnats-bugs@gnats.NetBSD.org
Subject: vi can't resize in -current
X-Send-Pr-Version: 3.95
>Number: 43839
>Category: bin
>Synopsis: vi can't resize in -current
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Sep 04 02:40:01 +0000 2010
>Closed-Date: Sun Feb 12 12:26:16 +0000 2012
>Last-Modified: Sun Feb 12 12:26:16 +0000 2012
>Originator: matthew green
>Release: NetBSD 5.99.39
>Organization:
people's front against (bozotic) www (softwar foundation)
>Environment:
Architecture: amd64
Machine: amd64
>Description:
resizing an xterm with a vi running in it doesn't work properly.
vi definately notices, but i think it fails to reset the scroll
regions. it is unable to display anything in the new larger space,
and i believe i see it scrolling ~'s up the screen when the resize
actually happens.
i'm pretty sure this started happening with terminfo support.
>How-To-Repeat:
resize a window with vi.
>Fix:
>Release-Note:
>Audit-Trail:
From: Julian Coleman <jdc@coris.org.uk>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: bin/43839: vi can't resize in -current
Date: Mon, 6 Sep 2010 07:23:21 +0100
Hi,
> resizing an xterm with a vi running in it doesn't work properly.
> vi definately notices, but i think it fails to reset the scroll
> regions. it is unable to display anything in the new larger space,
> and i believe i see it scrolling ~'s up the screen when the resize
> actually happens.
mlelstv@ pointed out that vi no longer calls resizeterm(). Thus, the curses
structures do not get updated on resize. We had a local patch for this with
the old vi:
http://cvsweb.netbsd.org/bsdweb.cgi/src/usr.bin/vi/cl/Attic/cl_screen.c.diff?r1=1.6&r2=1.7
However, calling resizeterm() in cl_vi_init() didn't seem to work with the
new vi (I didn't check the code path), so I tried calling resizeterm() from
the sigwinch check in cl_ssize() - see appended patch. This worked for me,
although I haven't tested extensively.
Thanks,
J
- - 8< - - - - - - - - - - - - - Cut here - - - - - - - - - - - - - >8 - -
--- /usr/cvs/src/dist/nvi/cl/cl_term.c 2009-01-03 20:00:43.000000000 +0000
+++ src/dist/nvi/cl/cl_term.c 2010-09-06 07:13:37.000000000 +0100
@@ -414,6 +414,7 @@
*rowp = row;
if (colp != NULL)
*colp = col;
+ resizeterm(O_VAL(sp, O_LINES), O_VAL(sp, O_COLUMNS));
return (0);
}
- - 8< - - - - - - - - - - - - - Cut here - - - - - - - - - - - - - >8 - -
--
My other computer also runs NetBSD / Sailing at Newbiggin
http://www.netbsd.org/ / http://www.newbigginsailingclub.org/
From: "Julian Coleman" <jdc@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/43839 CVS commit: src/dist/nvi/cl
Date: Sat, 24 Sep 2011 18:57:47 +0000
Module Name: src
Committed By: jdc
Date: Sat Sep 24 18:57:47 UTC 2011
Modified Files:
src/dist/nvi/cl: cl_term.c
Log Message:
Work around PR#43839, by calling resizeterm() on SIGWINCH.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/dist/nvi/cl/cl_term.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: spz@NetBSD.org
State-Changed-When: Sun, 12 Feb 2012 12:26:16 +0000
State-Changed-Why:
fixed by jdc on 2011/09/24 18:57:46 with revision 1.3 of
src/dist/nvi/cl/cl_term.c:
Work around PR#43839, by calling resizeterm() on SIGWINCH.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.