On Wed, Dec 23, 2015 at 09:26:43AM +0300, Andrei Borzenkov wrote:
> On Wed, Dec 23, 2015 at 7:45 AM, Michael Chang <[email protected]> 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

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to