grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] normal: fix get_logical_num_lines


From: Michael Chang
Subject: Re: [PATCH] normal: fix get_logical_num_lines
Date: Wed, 23 Dec 2015 16:38:14 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Dec 23, 2015 at 09:26:43AM +0300, Andrei Borzenkov wrote:
> On Wed, Dec 23, 2015 at 7:45 AM, Michael Chang <address@hidden> wrote:
> > In menu editing mode, grub2 shows bogus line if the character being
> > edited is at last column of entry. This patch fixes the problem by
> > having the get_logical_num_lines function to calculate correct number of
> > lines.
> >
> 
> There is one more occurrence in update_screen (); could you check if
> this needs fix too?
> 
>   grub_size_t t = grub_getstringwidth (linep->buf, linep->buf + 
> screen->column,
>       term_screen->term);
>   y += t / (unsigned) term_screen->geo.entry_width;

No, as the check followed has bailed it out.

  if (t % (unsigned) term_screen->geo.entry_width == 0
        && t != 0 &&  screen->column == linep->len)
            y--;

Of course, we can try to make the code more terse by the same fix so
that we can remove the check. Should I submit a new patch for that ? 

Thanks,
Michael



reply via email to

[Prev in Thread] Current Thread [Next in Thread]