From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7406 invoked by alias); 4 Sep 2014 12:17:28 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 7386 invoked by uid 89); 4 Sep 2014 12:17:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: mail-pd0-f173.google.com Received: from mail-pd0-f173.google.com (HELO mail-pd0-f173.google.com) (209.85.192.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 04 Sep 2014 12:17:27 +0000 Received: by mail-pd0-f173.google.com with SMTP id p10so13315500pdj.4 for ; Thu, 04 Sep 2014 05:17:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=VUBdlnIzTXVSj0Q+Bb7YUHbhkcqYq7tLeUkzMSW+2kg=; b=X0akcJINRKTaarBPTDhmgRWnUs79bqj5Zs6czuIv7fO6xUzdmJd2SmOohmOHE97du7 8psg/eY/fPO12lKIrCQ1fEjLXBj+W+cfeeKZdPErEL6fQMApxGWw5aotn0oc/+O64J6L j6Rtz2yAig0a16NWITvbmstw+vX3ULR2xDl9iwtJ9obYVaJqjkwgfYYm2j5UoCZGsquK S6a7InJ9KA3yGARuvyWEEAkXyvD6K5ZIuPa5q02Xhf/Unb6SAkttb/UUx68RbKZAr70w ZSiCqP2J1k44+u0ABws1MtTACqMM1SPn9x4afl8bUFaKdpE6HN/h6xHb0UNZ1fZekbZd SX5Q== X-Gm-Message-State: ALoCoQmRfT1JiXZu/E1146sGd2T652KhT5sQXliZM2PVTmMRapiiAFaKFi5bL/nNNjT0TjkEtxu0 MIME-Version: 1.0 X-Received: by 10.66.221.193 with SMTP id qg1mr8174660pac.9.1409833040632; Thu, 04 Sep 2014 05:17:20 -0700 (PDT) Received: by 10.70.118.134 with HTTP; Thu, 4 Sep 2014 05:17:20 -0700 (PDT) In-Reply-To: <54083483.6080502@redhat.com> References: <1409422278-19284-1-git-send-email-patrick@parcs.ath.cx> <54083483.6080502@redhat.com> Date: Thu, 04 Sep 2014 12:17:00 -0000 Message-ID: Subject: Re: [PATCH] Fix truncation of TUI command history From: Patrick Palka To: Pedro Alves Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-09/txt/msg00116.txt.bz2 On Thu, Sep 4, 2014 at 5:44 AM, Pedro Alves wrote: > Hi Patrick, > > On 08/30/2014 07:11 PM, Patrick Palka wrote: >> index aa14790..eee5f1ac6 100644 >> --- a/gdb/tui/tui-io.c >> +++ b/gdb/tui/tui-io.c >> @@ -678,8 +678,9 @@ tui_getc (FILE *fp) >> } >> else >> { >> + /* Move cursor to the end of the command line. */ >> wmove (w, TUI_CMD_WIN->detail.command_info.cur_line, >> - TUI_CMD_WIN->detail.command_info.curch); >> + strlen (tui_rl_saved_prompt) + rl_end); >> waddch (w, ch); > > Does this still do the right thing with secondary prompts? > > E.g., if you do "quit" while a program is running, and then > press enter a few times just to have the query repeat (and > then pagination kick in, for extra stress). > > Thanks, > Pedro Alves > Good point. It doesn't work correctly in this case. I'll try to find a better solution.