Edgewall Software
Modify

Opened 10 years ago

Last modified 9 years ago

#11730 new enhancement

Don't quickjump if multiple words in search phrase

Reported by: Ryan J Ollos Owned by:
Priority: normal Milestone: next-major-releases
Component: search system Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I noticed when seaching for a ticket that TracLinks wiki diff will result in a quickjump to the TracLinks page. When multiple words are used for search, I assume in most cases the user does not want to quickjump.

Attachments (0)

Change History (2)

comment:1 by Ryan J Ollos, 10 years ago

Considering a simple change that would check for multiple words before attempting to extract a link for quickjump:

  • trac/search/web_ui.py

    diff --git a/trac/search/web_ui.py b/trac/search/web_ui.py
    index eb4fee9..99e07e6 100644
    a b class SearchModule(Component):  
    163163            quickjump_href = req.href.browser(kwd)
    164164            name = kwd
    165165            description = _('Browse repository path %(path)s', path=kwd)
    166         else:
     166        elif len(kwd.split()) == 1:
    167167            context = web_context(req, 'search')
    168168            link = find_element(extract_link(self.env, context, kwd), 'href')
    169169            if link is not None:

However, I'm unsure about i18n behavior.

comment:2 by Ryan J Ollos, 9 years ago

Milestone: next-stable-1.0.xnext-major-releases

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.