Closed
Bug 197198
Opened 22 years ago
Closed 14 years ago
location bar autocomplete doesnt work if there is a leading space
Categories
(SeaMonkey :: Location Bar, defect)
SeaMonkey
Location Bar
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: mozilla, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030308 WebWasher 3.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030308 WebWasher 3.3
If a user (like me) is clumsy enough to hit the space bar before beginning to
type the URL, then autocomplete fails to find any matches in its history
(presumably because it's looking for sites whose URL begins with a space.
Autocomplete should be intelligent to strip any leading spaces
Reproducible: Always
Steps to Reproduce:
1. Move focus to Address bar
2. press space
3. type one of your common URLs
Actual Results:
No autocomplete suggestions
Expected Results:
suggested a completion
Is the QA contact email address current? I got a User Unknow error when I tried
to mail claudius@netscape.com
thx
Summary: location bar autocomplete doesnt work if there is a leading space → location bar autocomplete doesnt work if there is a leading space
I'm thinking of solving this with some code liek this:
(in nsAutoComplete.cpp)
NS_IMETHODIMP nsAutoCompleteResults::SetSearchString(const PRUnichar *
SearchString)
{
while (isspace(aSearchString[0])) {
memmove(aSearchString, aSearchString+1, strlen(aSearchString));
}
mSearchString = aSearchString;
return NS_OK;
}
But this gives the following compiler errors:
nsAutoComplete.cpp: In method `nsresult
nsAutoCompleteResults::SetSearchString (const PRUnichar *)':
nsAutoComplete.cpp:136: cannot convert `const PRUnichar *' to `const
char *' for argument `1' to `strlen (const char *)'
nsAutoComplete.cpp:136: cannot convert `const PRUnichar *' to `void *'
for argument `1' to `memmove (void *, const void *, unsigned int)'
I admit to never having programmed in C++ before and not much other programming
experience :)
Comment 3•22 years ago
|
||
-> All/All (behavior is true on OS X as well)
OS: Windows XP → All
Hardware: PC → All
Ok, mostly sorted out my type issues (except for memmove, but it compiles)
But the code doesnt do what I want it. I think maybe it is the right code but in
the wrong function. Would like help from someone who has experience with the
autocomplete functionality
NS_IMETHODIMP nsAutoCompleteResults::SetSearchString(const PRUnichar *
aSearchString)
{
while (nsCRT::IsAsciiSpace(aSearchString[0])) {
memmove((void *)aSearchString, (void *)aSearchString+1,
nsCRT::strlen(aSearchString));
}
mSearchString = aSearchString;
return NS_OK;
}
Comment 5•20 years ago
|
||
Hi Dave
Sorry - can't help with the coding questions but I can at least mark the bug as
confirmed
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b) Gecko/20050302
Status: UNCONFIRMED → NEW
Ever confirmed: true
fixed by bug 392141?
Assignee | ||
Updated•17 years ago
|
Product: Core → SeaMonkey
Updated•17 years ago
|
Assignee: hewitt → nobody
QA Contact: claudius → location-bar
![]() |
||
Comment 7•14 years ago
|
||
It is a WORKSFORME now that we are using the smart location bar functionality same as Firefox.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•