From nobody Wed Mar 8 20:49:02 2023 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PX4DG5p7fz3wrxY for ; Wed, 8 Mar 2023 20:49:02 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PX4DG4LRyz488x for ; Wed, 8 Mar 2023 20:49:02 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678308542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=muw7534J2vdNo24HSj92Ik9PLYHGZWZvq+7Pez+l3fQ=; b=i6ljV7ivAcQNeLt7e6HhV1JUNkIju5rLyt9+g3A6Eg+zALTnmNdSELU0podx5HFeXWe7Ci kJuERyCCw3cLH6nwkiKVB+dWgXjSYwlDt7ASVqAqt0Iogh7WZq89itQ1PgXBYqQH9hhZDg H/NR8yPJhSNgHnW6gfxquQIf/XrXZZzn/eDFHF6pOY6Jj78TNTNY4O82l8JcMm9mRA1Bm9 S2YBqzVTaREFQPplfNOm83Stjky2AhvK1DxRLACE/Y10KJvqwmXBmC36cMy6FjxVUhOXb3 ZkuKHdrpb7c6EHpzi91ddRzARlOEcsSgBCNUgPqoJyGhBR+HuaM2s5f5LsRK7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678308542; a=rsa-sha256; cv=none; b=T8WSliEraot2TNpnWVQrMTke4v/pon8h9T90iE8cwrpIP1EKfu7CSe8BPMul0P0ff3qKEX 4z/BMU2jct8aLwqNGuPf3HxeNeFF8G2QhYlPj3w1WNPYntqk4C8q+GIo4EbNZ7cV8wZtNm jBPrLN8rZdCW5H8/HIlz3GRO09RusNzveOlNDToWaAbC+FxOEdDb0+fdfTYniMjhBZ5134 XlstQcR/q6mp69znOBSNmdaO+wbEhKpI8p/YcGDr0028qbd7sjheRoD/ZOQ4KtcqY3msES 0Dv7da+423fGNr1zzAnosgm0Vu/ZaYXOWAubvAhr8dyA7p1Bub7hQgdzX/LGqQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PX4DG3KD0zgcR for ; Wed, 8 Mar 2023 20:49:02 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 328Kn2Vo063955 for ; Wed, 8 Mar 2023 20:49:02 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 328Kn2c3063954 for bugs@FreeBSD.org; Wed, 8 Mar 2023 20:49:02 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 270048] nvi(1) errors when g//!{cmd} modifies the number of lines Date: Wed, 08 Mar 2023 20:49:02 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: freebsd@tim.thechases.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D270048 Bug ID: 270048 Summary: nvi(1) errors when g//!{cmd} modifies the number of lines Product: Base System Version: Unspecified Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: freebsd@tim.thechases.com To replicate $ yes hello | head -50 | fmt -100 > wide_lines.txt $ vi wide_lines.txt :.!fmt correctly formats the first line as expected. However attempting=20 to reformat each individual line with: :g/^/.!fmt=20 errors with """ +=3D+=3D+=3D+=3D+=3D+=3D+=3D+ Illegal address: only 6 lines in the file. Error: unable to retrieve line 7; 4 lines added; 2 lines deleted Press any key to continue:=20 """ (the "4 lines added; 2 lines deleted" and possibly the "Press any=20 key to continue" might be a screen artifact from prior to the error message since it's not in reverse video like the rest of the error) Expected behavior: each individual line gets passed through fmt(1)=20 to reformat it. Observed behavior: an error about the number of lines in the file and only a portion of the lines are properly reformatted. It sounds like something isn't re-calculating the number of lines=20 in the file before/after a "!{cmd}" invocation within the context=20 of a :g// command. Or perhaps the lines marked by the g:// don't=20 get updated after reading data output of an external "!{cmd}" FWIW, this manifests in OpenBSD's nvi(1), too. (bug encountered when using composing a mail message, wanting to reformat l= ong lines individually rather than by paragraph) --=20 You are receiving this mail because: You are the assignee for the bug.=