Received: from list by lists.gnu.org with archive (Exim 4.71) id 1aDPb6-0006r3-Jg for mharc-grub-devel@gnu.org; Sun, 27 Dec 2015 23:39:52 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDPb3-0006qF-Cu for grub-devel@gnu.org; Sun, 27 Dec 2015 23:39:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aDPb0-0002qd-4U for grub-devel@gnu.org; Sun, 27 Dec 2015 23:39:49 -0500 Received: from victor.provo.novell.com ([137.65.250.26]:45809 helo=prv3-mh.provo.novell.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDPaz-0002pP-Sz for grub-devel@gnu.org; Sun, 27 Dec 2015 23:39:46 -0500 Received: from linux-dsax.tai.apac.novell.com (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by prv3-mh.provo.novell.com with ESMTP (TLS encrypted); Sun, 27 Dec 2015 21:39:32 -0700 Date: Mon, 28 Dec 2015 12:28:08 +0800 From: Michael Chang To: Andrei Borzenkov , The development of GNU GRUB Subject: Re: [PATCH] normal: fix get_logical_num_lines Message-ID: <20151228042808.GC17636@linux-dsax.tai.apac.novell.com> Mail-Followup-To: Andrei Borzenkov , The development of GNU GRUB References: <20151223044505.GA28369@linux-dsax.tai.apac.novell.com> <20151228040958.GB17636@linux-dsax.tai.apac.novell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151228040958.GB17636@linux-dsax.tai.apac.novell.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 137.65.250.26 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2015 04:39:50 -0000 On Mon, Dec 28, 2015 at 12:09:58PM +0800, Michael Chang wrote: > On Thu, Dec 24, 2015 at 02:48:34PM +0300, Andrei Borzenkov wrote: > > It sounds like we need > > > > string_width = grub_getstringwidth (linep->buf, linep->buf + > > linep->len, term_screen->term); > > if (!string_width) > > return 1; > > return (string_width + (unsigned) term_screen->geo.entry_width - 1) / > > (unsigned) term_screen->geo.entry_width; > > > > Could you test if it works for you? > > Yes. It works great. Hi Andrei, I found we had a down stream bug opened for the problem a while ago that could be fixed by the patch. https://bugzilla.suse.com/show_bug.cgi?id=943585 So please consider to commit your patch if you think it's ready to go as well after the testing. Thanks, Michael