NetBSD Problem Report #48502
From mlevins@users.sourceforge.net Sun Jan 5 17:13:39 2014
Return-Path: <mlevins@users.sourceforge.net>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id E711FA6464
for <gnats-bugs@gnats.NetBSD.org>; Sun, 5 Jan 2014 17:13:39 +0000 (UTC)
Message-Id: <19563.1388849541@poultrygeist.com>
Date: Sun, 5 Jan 2014 12:04:54 -0500 (EST)
From: "M. Levinson" <mlevins@users.sourceforge.net>
Reply-To: "M. Levinson" <mlevins@users.sourceforge.net>
To: gnats-bugs@NetBSD.org
Subject: vi(1) no longer moves the cursor when yanking text using a mark
X-Send-Pr-Version: 3.95
>Number: 48502
>Category: bin
>Synopsis: vi(1) no longer moves the cursor when yanking text using a mark
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jan 05 17:15:00 +0000 2014
>Closed-Date: Mon Jan 06 14:29:43 +0000 2014
>Last-Modified: Mon Jan 06 14:29:43 +0000 2014
>Originator: M. Levinson
>Release: NetBSD 6.99.28 from 2014-01-02
>Organization:
>Environment:
$NetBSD: v_mark.c,v 1.2 2013/11/22 15:52:06 christos Exp $
Architecture: x86_64
Machine: amd64
>Description:
When yanking or deleting text between the cursor and a mark on an
earlier line, vi no longer moves the cursor to the mark (as it did in
the past) because revision 1.2 of external/bsd/nvi/dist/vi/v_mark.c
removed an unneeded variable but left a dangling "else" where its
value was formerly assigned. Revision 1.2 of v_search.c has an
analogous change with the same problem.
(Those changes originated in revision 1.3 of dist/nvi/vi/v_mark.c
and revision 1.5 of dist/nvi/vi/v_search.c before nvi was relocated
to external/bsd.)
>How-To-Repeat:
vi /path/to/some/file
set a mark with the command "ma"
move the cursor down a few lines with a command such as "5j"
yank back to the mark with the command "y'a"
(or alternatively, delete back to the mark with the command "d'a")
The cursor location is unchanged, whereas in the past vi would move
the cursor to the mark as described in the comments in v_yank.c and
v_mark.c.
>Fix:
diff -u src/external/bsd/nvi/dist/vi/v_mark.c src/external/bsd/nvi/dist/vi/v_mark.c
--- src/external/bsd/nvi/dist/vi/v_mark.c
+++ src/external/bsd/nvi/dist/vi/v_mark.c
@@ -169,7 +169,7 @@ mark(SCR *sp, VICMD *vp, int getmark, enum which cmd)
m = vp->m_start;
vp->m_start = vp->m_stop;
vp->m_stop = m;
- } else
+ }
/*
* Yank cursor motion, when associated with marks as motion commands,
diff -u src/external/bsd/nvi/dist/vi/v_search.c src/external/bsd/nvi/dist/vi/v_search.c
--- src/external/bsd/nvi/dist/vi/v_search.c
+++ src/external/bsd/nvi/dist/vi/v_search.c
@@ -525,7 +525,7 @@ v_correct(SCR *sp, VICMD *vp, int isdelta)
m = vp->m_start;
vp->m_start = vp->m_stop;
vp->m_stop = m;
- } else
+ }
/*
* BACKWARD:
>Release-Note:
>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/48502 CVS commit: src/external/bsd/nvi/dist/vi
Date: Sun, 5 Jan 2014 12:30:16 -0500
Module Name: src
Committed By: christos
Date: Sun Jan 5 17:30:16 UTC 2014
Modified Files:
src/external/bsd/nvi/dist/vi: v_mark.c
Log Message:
PR/48502: M. Levinson: vi(1) no longer moves the cursor when yanking text
using a mark (remove dangling else)
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/nvi/dist/vi/v_mark.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/48502 CVS commit: src/external/bsd/nvi/dist/vi
Date: Mon, 6 Jan 2014 09:21:37 -0500
Module Name: src
Committed By: christos
Date: Mon Jan 6 14:21:37 UTC 2014
Modified Files:
src/external/bsd/nvi/dist/vi: v_search.c
Log Message:
PR/48502: M. Levinson: vi(1) no longer moves the cursor when yanking text
using a mark (remove dangling else)
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/nvi/dist/vi/v_search.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: wiz@NetBSD.org
State-Changed-When: Mon, 06 Jan 2014 14:29:43 +0000
State-Changed-Why:
christos committed both patches -- thanks for the PR!
>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.