Closed Bug 146509 Opened 22 years ago Closed 22 years ago

Tab completion doesn't work with non-alphanumeric characters

Categories

(Other Applications :: ChatZilla, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bugzilla-mozilla-20000923, Assigned: rginda)

References

Details

Attachments

(1 file)

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0rc2)
Gecko/20020510
BuildID:    2002051006

The tab completion in ChatZilla seems to fail if a nick (for example) has any
non-alphanumeric characters in it. For example, it's quite common to use a pipe
(|) to seperate one's status in a nickname. Once you have a | in the nickname
you're typing, tab-completion simply fails to do anything.

Reproducible: Always
Steps to Reproduce:
1. Open ChatZilla.
2. Join a channel on a server that has nicknames with a pipe (|).
3. Type someone's nickname up to and including the pipe.
4. Hit tab.

Actual Results:  Nothing happens - tab completion doesn't do anything.

Expected Results:  Nickname is tab completed, as normal.

I've tracked this down to line 824 of content/chatzilla/handlers.js:

    var wordStart = line.substr(0, selStart).search(/\s\w*$/);

The problem, as far as I can tell, is that \w will only match stuff in the set
[0-9a-zA-Z_], meaning once you have typed any other character of a nickname,
etc., tab completion simply fails.

I would suggest that changing the \w to \S would fix this, given that \S
represents [^\s] - which is really what we want here (this assumes \S exists in
JS regexps, otherwise just use [^\s]).
*** Bug 146487 has been marked as a duplicate of this bug. ***
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 2000 → All
Summary: Tab completion doesn't always work → Tab completion doesn't work with non-alphanumeric characters
Status: NEW → ASSIGNED
Keywords: patch, review
Hardware: PC → All
Comment on attachment 91463 [details] [diff] [review]
change the regex to use \S

r=rginda
Attachment #91463 - Flags: review+
Comment on attachment 91463 [details] [diff] [review]
change the regex to use \S

a=asa (on behalf of drivers) for checkin to the 1.1 trunk.
Attachment #91463 - Flags: approval+
checked in
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Product: Core → Other Applications
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: