hud searches should strip() the search string

Bug #937020 reported by Alan Bell
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Application Menu Indicator
Fix Released
Low
Allison Karlitskaya
indicator-appmenu (Ubuntu)
Fix Released
Low
Allison Karlitskaya

Bug Description

currently the hud takes options away from you if you type them correctly, this is disconcerting. One major situation where this happens is if the user correctly types a word that is in the menu somewhere and then presses space to start typing the following word. The HUD then takes away all the options containing that word. It should ideally take away all the options that don't include that full word, alternatively do nothing. Don't take away the right options.

"edit " should take away options including "editor" or "editing" but should not take away options such as "edit page"

in nautilus searching for "new" shows things like "new page" or "new tab" but searching for "new " shows totally irrelevant stuff, not containing "new" at all.

Tags: hud
affects: unity (Ubuntu) → indicator-appmenu (Ubuntu)
tags: added: hud
Revision history for this message
Sebastien Bacher (seb128) wrote :

That's still an issue, Ryan would you be interested by looking at it?

Changed in indicator-appmenu (Ubuntu):
assignee: nobody → Ryan Lortie (desrt)
importance: Undecided → Low
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in indicator-appmenu (Ubuntu):
status: New → Confirmed
Olli Ries (ories)
Changed in indicator-appmenu:
assignee: nobody → Ryan Lortie (desrt)
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Matthias Schmidt (mschmidt) wrote :

Confirmed. This bug is really annoying as it renders the HUD useless :/ (depending on what you type).

Revision history for this message
Allison Karlitskaya (desrt) wrote :

The way the new hud-performance work does the token splitting should prevent this from happening.

The loop in question now reads like so:

  while (*string)
    {
      /* strip separators */
      string += strspn (string, SEPARATORS);

      if (*string)
        {
          gint length;

          /* consume a token */
          length = strcspn (string, SEPARATORS);
          g_ptr_array_add (array, hud_token_new (string, length));
          string += length;
        }
    }

so any number of trailing separators should be silently consumed and have no additional effect on the search.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package indicator-appmenu - 0.3.96-0ubuntu3

---------------
indicator-appmenu (0.3.96-0ubuntu3) precise; urgency=low

  * Backport desrt's performance improvement work:
    - reduce hud cpu usage and DoS on long strings (lp: #938584, ##948820)
    - should stop stripping issues (lp: #937020)
    - fixes a small leak (lp: #972354)
 -- Sebastien Bacher <email address hidden> Tue, 03 Apr 2012 17:59:03 +0200

Changed in indicator-appmenu (Ubuntu):
status: Confirmed → Fix Released
Changed in indicator-appmenu:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.