From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Martin Trojer Newsgroups: gmane.emacs.bugs Subject: bug#17497: The text-mode menu looks very broken in emacs-24 Date: Wed, 18 Mar 2015 17:13:13 +0000 Message-ID: References: <5374B271.50803@yandex.ru> <83a8zaxnrx.fsf@gnu.org> <837fuexmbk.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bb04be2c7b27005119332be X-Trace: ger.gmane.org 1426698857 32404 80.91.229.3 (18 Mar 2015 17:14:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 Mar 2015 17:14:17 +0000 (UTC) Cc: 17497@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 18 18:14:10 2015 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 1YYHXl-0007gx-Iv for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Mar 2015 18:14:09 +0100 Original-Received: from localhost ([::1]:34929 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYHXl-0004zi-0G for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Mar 2015 13:14:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41478) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYHXh-0004zK-GZ for bug-gnu-emacs@gnu.org; Wed, 18 Mar 2015 13:14:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YYHXe-0000rF-6G for bug-gnu-emacs@gnu.org; Wed, 18 Mar 2015 13:14:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53275) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYHXe-0000rB-38 for bug-gnu-emacs@gnu.org; Wed, 18 Mar 2015 13:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YYHXd-0007H3-J5 for bug-gnu-emacs@gnu.org; Wed, 18 Mar 2015 13:14:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Martin Trojer Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Mar 2015 17:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17497 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17497-submit@debbugs.gnu.org id=B17497.142669879627865 (code B ref 17497); Wed, 18 Mar 2015 17:14:01 +0000 Original-Received: (at 17497) by debbugs.gnu.org; 18 Mar 2015 17:13:16 +0000 Original-Received: from localhost ([127.0.0.1]:51843 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YYHWt-0007FK-TV for submit@debbugs.gnu.org; Wed, 18 Mar 2015 13:13:16 -0400 Original-Received: from mail-we0-f181.google.com ([74.125.82.181]:32835) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YYHWr-0007F9-VL for 17497@debbugs.gnu.org; Wed, 18 Mar 2015 13:13:14 -0400 Original-Received: by weop45 with SMTP id p45so37633819weo.0 for <17497@debbugs.gnu.org>; Wed, 18 Mar 2015 10:13:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=24SgU3s5OmiWSiNF94SIw8LbKpWZcXVt23K9pOUu41U=; b=Cq7lpJne+El9YatI2yqRjfvJ3cNNVepeu+kgX1S1ueMI+Y5buPK8g05pCYATPaIY5w STBw1A6SLUaQW2Jw7lbz0EOH/COuFMaSWOqTv012AW+SLJBz1nBo8U71plJZDBgFjZq9 FbR2VsuS4FZliS0j4p0hvX4pwxOqg7EZpmSN8Q3SSVeBIgNS2qoOL+EK/EcvJk2DqJBL Fkb7keR22p8tb5D/QDFAxsneEV7wMaF86vHnmhItnxiVhu+bOS2oPDj+ik2p/ykfjrRu WIjZnv23DyJapSPpBIGFGsIfC7/+Wpxr3SfzwJ6m+BrVKdP/0CadduTpTWGt/kyytXMs hPEQ== X-Received: by 10.194.82.226 with SMTP id l2mr147228022wjy.11.1426698793364; Wed, 18 Mar 2015 10:13:13 -0700 (PDT) Original-Received: by 10.27.1.85 with HTTP; Wed, 18 Mar 2015 10:13:13 -0700 (PDT) In-Reply-To: <837fuexmbk.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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:100622 Archived-At: --047d7bb04be2c7b27005119332be Content-Type: text/plain; charset=UTF-8 >From bdff1ff98d02f4307659c052d0b35a40a36f0706 Mon Sep 17 00:00:00 2001 From: Martin Trojer Date: Wed, 18 Mar 2015 11:44:02 +0000 Subject: [PATCH] emacs bug #17497 fix --- src/cm.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/cm.c b/src/cm.c index 474f280..ed17447 100644 --- a/src/cm.c +++ b/src/cm.c @@ -371,6 +371,16 @@ cmgoto (struct tty_display_info *tty, int row, int col) dcm = tty->Wcm->cm_abs; } + /* only use direct moves */ + cost = 0; + p = (dcm == tty->Wcm->cm_habs + ? tgoto (dcm, row, col) + : tgoto (dcm, col, row)); + emacs_tputs (tty, p, 1, evalcost); + emacs_tputs (tty, p, 1, cmputc); + curY (tty) = row, curX (tty) = col; + return; + /* * In the following comparison, the = in <= is because when the costs * are the same, it looks nicer (I think) to move directly there. On Wed, Mar 18, 2015 at 5:11 PM, Eli Zaretskii wrote: > > Date: Wed, 18 Mar 2015 16:51:48 +0000 > > From: Martin Trojer > > > > I believe that snippet of code was from you :) I simply put that quoted > snipped > > in the cmgoto function as per your instructions. I'm sure this isn't the > 'right > > thing to do' since it completely bypasses the switch statement that > tries to do > > the cheapest cursor move. > > So what patch did you install, exactly, that fixed the problem? > --047d7bb04be2c7b27005119332be Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
From bdff1ff98d02f4307659c052d0b35a40a36f0706 Mon Sep 17 00=
:00:00 2001
From: Martin Trojer <martin.t=
rojer@gmail.com>
Date: Wed, 18 Mar 2015 11:44:02 +0000
Subject: [PATCH] emacs bug #17497 fix

---
 src/cm.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/cm.c b/src/cm.c
index 474f280..ed17447 100644
--- a/src/cm.c
+++ b/src/cm.c
@@ -371,6 +371,16 @@ cmgoto (struct tty_display_info *tty, int row, int col=
)
       dcm =3D tty->Wcm->cm_abs;
     }
=20
+    /* only use direct moves */
+    cost =3D 0;
+    p =3D (dcm =3D=3D tty->Wcm->cm_habs
+         ? tgoto (dcm, row, col)
+         : tgoto (dcm, col, row));
+    emacs_tputs (tty, p, 1, evalcost);
+    emacs_tputs (tty, p, 1, cmputc);
+    curY (tty) =3D row, curX (tty) =3D col;
+    return;
+
   /*
    * In the following comparison, the =3D in <=3D is because when the c=
osts
    * are the same, it looks nicer (I think) to move directly there.
<= /div>

On Wed, Mar = 18, 2015 at 5:11 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> Date: Wed, 18 Mar 2015 16:51:48 +0000
> From: Martin Trojer <mar= tin.trojer@gmail.com>
>
> I believe that snippet of code was from you :) I simp= ly put that quoted snipped
> in the cmgoto function as per your instructions. I'm sure this isn= 't the 'right
> thing to do' since it completely bypasses the switch statement tha= t tries to do
> the cheapest cursor move.

So what patch did you install, exactly, that fixed the problem?

--047d7bb04be2c7b27005119332be--