Re: [Vimprobable-users] [PATCH] Refactured hinting
Vimprobable is a lean web browser optimised for full keyboard control
Brought to you by:
hanness
From: Daniel C. <dan...@gm...> - 2011-08-25 22:20:40
|
Hi! On Thu, Aug 25, 2011 at 10:24:24PM +0200, Daniel Carl wrote: > Hi! > > I found a little bug. If I use hinting on a page with only one link, the link > is immediately opened like expected, but keeps in hintMode (. or , appear in > input box). > > In the main.c file in input() function following lines seems to cause the > behavior by inserting the last input content (arg->s) into the inputbox: > > /* to avoid things like :open URL :open URL2 or :open :open URL */ > gtk_entry_set_text(GTK_ENTRY(inputbox), ""); > gtk_editable_insert_text(GTK_EDITABLE(inputbox), arg->s, -1, &pos); > if (arg->i & InsertCurrentURL && (url = webkit_web_view_get_uri(webview))) > gtk_editable_insert_text(GTK_EDITABLE(inputbox), url, -1, &pos); > gtk_widget_grab_focus(inputbox); > gtk_editable_set_position(GTK_EDITABLE(inputbox), -1); > > How can we avoid that vimprobable keeps in hintmode even if the only hint was > successfully fired and the mode where set to NormalMode? I found a solution, but I'm not sure if it doesn't insert another bug. To move mentioned lines before the hint script is executed solves the bug. This solves also the bug, that hints aren't create if url was opened and is still present in inputbox (:open url). If 'f' or 'F' is pressed when the url is still in inputbox, the hints where not created and I have to press ESC and start hinting again. Both bugs appear also in current HEAD revision of vimprobable2. Attached patch was done on top of the hinting-refacture. Daniel |