Tab completion doesn't work with non-alphanumeric characters

RESOLVED FIXED

Status

Other Applications
ChatZilla
RESOLVED FIXED
16 years ago
14 years ago

People

(Reporter: James Ross, Assigned: Robert Ginda)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

16 years ago
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]).

Comment 1

16 years ago
*** Bug 146487 has been marked as a duplicate of this bug. ***

Updated

16 years ago
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

Comment 2

16 years ago
Created attachment 91463 [details] [diff] [review]
change the regex to use \S

Updated

16 years ago
Status: NEW → ASSIGNED
Keywords: patch, review
Hardware: PC → All
(Assignee)

Comment 3

16 years ago
Comment on attachment 91463 [details] [diff] [review]
change the regex to use \S

r=rginda
Attachment #91463 - Flags: review+

Comment 4

16 years ago
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+

Comment 5

16 years ago
checked in
Status: ASSIGNED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
Product: Core → Other Applications
You need to log in before you can comment on or make changes to this bug.