From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15915 invoked by alias); 28 Aug 2014 14:18:13 -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 15899 invoked by uid 89); 28 Aug 2014 14:18:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,COMPENSATION,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: mail-pa0-f44.google.com Received: from mail-pa0-f44.google.com (HELO mail-pa0-f44.google.com) (209.85.220.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 28 Aug 2014 14:18:09 +0000 Received: by mail-pa0-f44.google.com with SMTP id rd3so2739022pab.31 for ; Thu, 28 Aug 2014 07:18:06 -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=wrTWyDmdTIeobzW9/EWAqljepKdAt7P9Cya0pJ8/46Y=; b=AZvUn7MZsiOjms+CZyat0foTIW5IHBJkouRwjfokHY0IM9MuBA2uaNOyuXD1eTU/t4 lFklavmrYKTfv4ngI+WOWftvTlah3YDeJU6QAkDSQ+mmKUFEiVEl3xLOIFobC+PgYtR7 6nkbfDe46nnqJXRJGDh/ytDMG/eXT7m43Of/WLmrTyAPwR9Fkptu3onXM3BWUlASjHrF 2/WQQ0rK6pKgpjBDoircp3qu3F320oXJS2Tvx1C4EXNCMd8YC3CKL9EEvPAKdCQTgdsh mUlhhzapZv3QXsy2fjj78ThK8XgzwAfAaJJfRjGDW5sj+5tZzPGr3RyO235uQZG7kQAm E0Aw== X-Gm-Message-State: ALoCoQnSo6iB87Clh+mGvctKn1y0ypd2qDQt2r3feljjYolnkKfBBuhLK4afKAWeEGIjDVWkfO8Q MIME-Version: 1.0 X-Received: by 10.68.233.68 with SMTP id tu4mr6340285pbc.65.1409235485907; Thu, 28 Aug 2014 07:18:05 -0700 (PDT) Received: by 10.70.5.229 with HTTP; Thu, 28 Aug 2014 07:18:05 -0700 (PDT) In-Reply-To: <53FF12FF.3020003@redhat.com> References: <1408740286-29326-1-git-send-email-patrick@parcs.ath.cx> <53FF12FF.3020003@redhat.com> Date: Thu, 28 Aug 2014 14:18:00 -0000 Message-ID: Subject: Re: [PATCH] Fix the processing of Meta-key commands in TUI 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-08/txt/msg00613.txt.bz2 On Thu, Aug 28, 2014 at 7:31 AM, Pedro Alves wrote: > On 08/22/2014 09:44 PM, Patrick Palka wrote: >> + >> + if (async_command_editing_p && key_is_start_sequence (ch)) > > I think the key_is_start_sequence check means that we'll > fail to compensate in case the sequence if longer than > 2 bytes? That is, we'll compensate for the second char, > but fail to compensate for the third, because by then, > ch will not be a start sequence key. Yes I think so. I only took into account common 2-byte sequences such as Alt_F. I suppose that the check could be removed to account for 3+-byte key sequences too, but I haven't thought out the consequences of such change. And I'm not sure that readline uses any of such sequences. > >> + { >> + int ch_pending; >> + >> + nodelay (w, TRUE); >> + ch_pending = wgetch (w); >> + nodelay (w, FALSE); >> + > > Thanks, > Pedro Alves >