NetBSD Problem Report #58090

From www@netbsd.org  Fri Mar 29 23:31:09 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 619251A923B
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 29 Mar 2024 23:31:09 +0000 (UTC)
Message-Id: <20240329233107.F0E7B1A923C@mollari.NetBSD.org>
Date: Fri, 29 Mar 2024 23:31:07 +0000 (UTC)
From: rwhitlock22@gmail.com
Reply-To: rwhitlock22@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Ctrl-Z, fg makes blinking cursor in vi
X-Send-Pr-Version: www-1.0

>Number:         58090
>Category:       bin
>Synopsis:       Ctrl-Z, fg makes blinking cursor in vi
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 29 23:35:00 +0000 2024
>Last-Modified:  Sat Mar 30 01:40:01 +0000 2024
>Originator:     Robert Whitlock
>Release:        NetBSD 10.0 RC6
>Organization:
>Environment:
NetBSD thinkpad 10.0_RC6 NetBSD 10.0_RC6 (THINKPAD) #0: Tue Mar 26 18:20:30 EDT 2024  rob@thinkpad:/usr/src_netbsd-10/arch/amd64/compile/THINKPAD amd64
>Description:
If you suspend vi with Control-Z and then resume it with fg, the
cursor blinks whereas before it was suspended it did not.
>How-To-Repeat:
Open an xterm
Run vi
Notice the cursor is not blinking
Type Ctrl-Z to suspend vi
Type fg to resume vi
Notice that the cursor is blinking

Note that this does not happen in a VT.
>Fix:
I would guess that either some terminfo settings are incorrect or vi
doesn't use them correctly.

>Release-Note:

>Audit-Trail:
From: Valery Ushakov <uwe@stderr.spb.ru>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: bin/58090: Ctrl-Z, fg makes blinking cursor in vi
Date: Sat, 30 Mar 2024 04:27:20 +0300

 A minimized reproducer distilled from cl_suspend() is

 #include <curses.h>

 int
 main(void)
 {
     initscr();
     getch();
     endwin();
     refresh(); // <- makes it blink
     getch();
     endwin();
     return 0;
 }


 -uwe

From: Valery Ushakov <uwe@stderr.spb.ru>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: bin/58090: Ctrl-Z, fg makes blinking cursor in vi
Date: Sat, 30 Mar 2024 04:36:05 +0300

 The bug is in curses and it's that we init

     new_screen->old_mode = 2;

 Where "old_mode" is a bit cryptic, but it means the old cursor mode:

     void
     __restore_cursor_vis(void)
     {
             curs_set(_cursesi_screen->old_mode);
     }


 -uwe

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.