From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 82835 invoked by alias); 15 Mar 2019 15:33:58 -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 82822 invoked by uid 89); 15 Mar 2019 15:33:58 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=ante, HX-Languages-Length:725, quo X-HELO: gateway30.websitewelcome.com Received: from gateway30.websitewelcome.com (HELO gateway30.websitewelcome.com) (192.185.180.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 15 Mar 2019 15:33:56 +0000 Received: from cm14.websitewelcome.com (cm14.websitewelcome.com [100.42.49.7]) by gateway30.websitewelcome.com (Postfix) with ESMTP id 4474327268 for ; Fri, 15 Mar 2019 10:33:54 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id 4oqIhXkp82qH74oqIhzz9P; Fri, 15 Mar 2019 10:33:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=kARZ/ty/L54nH7b2K9KKs+9j+KdLrFcnstQdlyIhYHo=; b=bQxI9rxUGGlGjEMgbdniwaNJmk Uc5ZOH3f7YNsBoTQNs9M47XjC+XOjxOmZztr5cWGCgBirtCUfCx7I4j4CIlDmf10dwcvhPK8Fkk5a gmjQESq+QRZ1vP7/PvoOLpYpb; Received: from 174-29-37-56.hlrn.qwest.net ([174.29.37.56]:49654 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1h4oqH-000e40-M5; Fri, 15 Mar 2019 10:33:53 -0500 From: Tom Tromey To: Pedro Alves Cc: Eli Zaretskii , Tom Tromey , gdb-patches@sourceware.org Subject: Re: Fix pressing down in the TUI (Re: [RFC 8.3 0/3] Some style fixes) References: <20190308210433.32683-1-tromey@adacore.com> <83pnr08tc8.fsf@gnu.org> <83zhq26fcw.fsf@gnu.org> <874l899nh3.fsf@tromey.com> <8336ns3uv4.fsf@gnu.org> Date: Fri, 15 Mar 2019 15:33:00 -0000 In-Reply-To: (Pedro Alves's message of "Fri, 15 Mar 2019 12:34:34 +0000") Message-ID: <874l84b19c.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-03/txt/msg00316.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: Pedro> Otherwise this LGTM. I see get_plain_source_lines has similar Pedro> code, so my immediate thought was to move that to a helper function, Pedro> but there's a difference that makes that unviable -- get_plain_source_lines Pedro> always wants to open the source file first, while here we can avoid Pedro> it unless line_charpos is 0. I don't really like having to open the file like this on every step, and especially not just do call some other function for its side-effects. However, this is the status quo ante, so the patch seems fine; and I made a note to fix this up eventually. Tom