From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Geoff Jacobsen Newsgroups: gmane.emacs.bugs Subject: bug#11167: trunk; term.el inserts newline when erasing-to-eol [PATCH] Date: Wed, 4 Apr 2012 18:06:15 +1200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf30780a6c9e385104bcd438ea X-Trace: dough.gmane.org 1333524653 30067 80.91.229.3 (4 Apr 2012 07:30:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 4 Apr 2012 07:30:53 +0000 (UTC) To: 11167@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 04 09:30:51 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SFKg3-00068A-Ql for geb-bug-gnu-emacs@m.gmane.org; Wed, 04 Apr 2012 09:30:48 +0200 Original-Received: from localhost ([::1]:39532 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFKZ1-0000Ll-Gu for geb-bug-gnu-emacs@m.gmane.org; Wed, 04 Apr 2012 03:23:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFJkr-00088m-PT for bug-gnu-emacs@gnu.org; Wed, 04 Apr 2012 02:31:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SFJkn-0000Bd-4S for bug-gnu-emacs@gnu.org; Wed, 04 Apr 2012 02:31:41 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42343) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFJkm-0000BT-Uc for bug-gnu-emacs@gnu.org; Wed, 04 Apr 2012 02:31:37 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SFJlC-0000Bn-1n for bug-gnu-emacs@gnu.org; Wed, 04 Apr 2012 02:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Geoff Jacobsen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 04 Apr 2012 06:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 11167 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.1333521064648 (code B ref -1); Wed, 04 Apr 2012 06:32:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Apr 2012 06:31:04 +0000 Original-Received: from localhost ([127.0.0.1]:38881 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SFJkB-0000A3-RB for submit@debbugs.gnu.org; Wed, 04 Apr 2012 02:31:04 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57472) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SFJMn-00084R-5l for submit@debbugs.gnu.org; Wed, 04 Apr 2012 02:06:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SFJMM-0002xb-1i for submit@debbugs.gnu.org; Wed, 04 Apr 2012 02:06:23 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:50413) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFJML-0002xW-SZ for submit@debbugs.gnu.org; Wed, 04 Apr 2012 02:06:21 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58985) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFJMK-00061J-9Z for bug-gnu-emacs@gnu.org; Wed, 04 Apr 2012 02:06:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SFJMI-0002wn-B3 for bug-gnu-emacs@gnu.org; Wed, 04 Apr 2012 02:06:19 -0400 Original-Received: from mail-vx0-f169.google.com ([209.85.220.169]:38488) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFJMI-0002wV-4v for bug-gnu-emacs@gnu.org; Wed, 04 Apr 2012 02:06:18 -0400 Original-Received: by vcbfk14 with SMTP id fk14so379578vcb.0 for ; Tue, 03 Apr 2012 23:06:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=DRTl7exqFOargaM/8fJL+ZOT150FvoU6TEaQBKfKKPQ=; b=antL8YqmkX1k6kYHyCiHNFvGWk00wAmLH/8//isXZiItM0J47VVk9QZ3Qf4AMVvfwW fat8NtJo3pWuc7iooHUnwkp0V8mPVzH40xITEVhJP3c+9zwv41lwIhS3jeQQw4AaF/U+ ktVep4eMvQvA97AqVdkKN5Be6FI8FDo3z+YT1jtlauCVWiETs2IjHMDS+aFWh6ob7M4x KPoDwqfW0Kn6M8giPJZSHL+wNKmsxmumbXsfwqicr6TCjwYe/fvrOIj7vF0STLxg+7Xc weqzcaok+6WoqdEq3OHpUUt5n4IbEH2xnni4Al5HzN2jhDCefAHB7bbpHYZhhqCRPDg1 tkGw== Original-Received: by 10.52.36.242 with SMTP id t18mr6136382vdj.7.1333519575824; Tue, 03 Apr 2012 23:06:15 -0700 (PDT) Original-Received: by 10.220.4.130 with HTTP; Tue, 3 Apr 2012 23:06:15 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Wed, 04 Apr 2012 02:30:57 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-Mailman-Approved-At: Wed, 04 Apr 2012 03:23:30 -0400 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:58501 Archived-At: --20cf30780a6c9e385104bcd438ea Content-Type: text/plain; charset=UTF-8 When term.el receives a "^[[K" erase-end-of-line the term-erase-in-line function inserts a new line. When variable term-scroll-show-maximum-output is set to t this can result in a blank line at the bottom of the buffer. This breaks programs such as less which won't display the top line. I can't see the purpose for the new-line. The following patch removes it. === modified file 'lisp/term.el' --- lisp/term.el 2012-01-26 02:32:56 +0000 +++ lisp/term.el 2012-04-04 05:26:53 +0000 @@ -3751,7 +3751,6 @@ ;; extra space when wrapped is false. (when wrapped (insert ? )) - (insert ?\n) (put-text-property saved-point (point) 'face 'default) (goto-char saved-point)))) --20cf30780a6c9e385104bcd438ea Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable When term.el receives a "^[[K" erase-end-of-line the=C2=A0term-er= ase-in-line function inserts a new line.=C2=A0
When variable=C2=A0term-= scroll-show-maximum-output is set to t this can result in a blank line at t= he bottom of the buffer.

This breaks programs such as less which won't displ= ay the top line.

I can't see the purpose for t= he new-line. The following patch removes it.


=3D=3D=3D modified file 'lisp/term.el'
--= - lisp/term.el 2012-01-26 02:32:56 +0000
+++ lisp/term.el 2012-04-04 05:26:53 +0000
@@ -3751,7 +3751,6 @@
=C2=A0 =C2=A0 =C2=A0 =C2=A0;; extra sp= ace when wrapped is false.
=C2=A0 =C2=A0 =C2=A0 =C2=A0(when wrapp= ed
=C2=A0 (insert ? ))
- =C2=A0 =C2=A0 =C2=A0(insert ?\n)
=C2=A0 =C2=A0 =C2=A0 =C2=A0(put-text-property saved-point (point) '= ;face 'default)
=C2=A0 =C2=A0 =C2=A0 =C2=A0(goto-char saved-p= oint))))

--20cf30780a6c9e385104bcd438ea--