On Sun, 08 Feb 2009 10:47:34 +0200 Vesa Jääskeläinen <ch...@nic.fi> wrote:
> phcoder wrote: > > Hello. I've run into the bug that when editing menu entry in gfxterm > > characters disappear after cursor moves away from its position. Here is > > bugfix > > I don't think this is a clean fix: > > > Index: term/gfxterm.c > > =================================================================== > > --- term/gfxterm.c (revision 1974) > > +++ term/gfxterm.c (working copy) > > @@ -744,6 +744,8 @@ > > /* Render cursor to text layer. */ > > grub_video_set_active_render_target (text_layer); > > grub_video_fill_rect (color, x, y, width, height); > > + if (! show) > > + write_char (); > > grub_video_set_active_render_target (GRUB_VIDEO_RENDER_TARGET_DISPLAY); > > > > /* Mark cursor to be redrawn. */ > > It is not designed to work in there. I think modifying this needs > logical level approach and not ad hoc fix. I developed a fix to this, which I committed (rev 2029) after testing showed it to fix the problem and it didn't seem to cause any regressions. It makes sure that the character is redrawn properly, since drawing the cursor destroys the character if already drawn there. Vesa, I don't know if you think my fix is any cleaner or less ad hoc than phcoder's solution since it works in a similar way. I committed it for now since it seems to me to be an improvement, at least, even if there is a way for the code to better express its intention than calling draw_cursor(0) or draw_cursor(1) to re-draw the current character either with or without the cursor displayed. There is still one other problem that remains with the cursor on the menu entry editor, but it seems to be separate: When the menu entry editor is entered, (hit 'e' on a menu entry), the cursor initially does not show up. You have to move the cursor to make it show up. However, it does show up immediately when you enter the GRUB command line (hit 'c'), so I think it may have to do with the menu entry editor's way of using the terminal--it will need more exploration. Regards, Colin
signature.asc
Description: PGP signature
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel