Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Improved TAB completion on client #544

Closed
wants to merge 5 commits into from
Closed

Improved TAB completion on client #544

wants to merge 5 commits into from

Conversation

doppioandante
Copy link

Fixes(?) #297
Requires fuse.js
I'm not a javascript programmer, please review with suspicion.
EDIT: I should probably make travis green first. Also, I need to add a line or two to the changelog before you merge.

Nickname completion is now handled through fuse.js.
When the completed nickname is being typed at the start of the text
input, a colon is added after it by the completer.
In all the other cases, just a space is added.
@doppioandante
Copy link
Author

I've tried to make the completion smarter by looking at a bunch of the last messages and extracting they nicks. Those will be suggested first. #434
I had to modify jquery/tabcomplete.js, as I explain in the commit message.

I'll wait for suggestions before doing any further work.

Completion on channels with huge nicklist become slow if generation is
done at every keystroke.
Fix works only if hints are disabled.
@doppioandante
Copy link
Author

I've been using this feature since and it works.
I've been wondering whether the fuzzy search is overblown though, maybe just skipping the first weird characters of the nicknames is good enough as a heuristic.

@jcrben
Copy link

jcrben commented Nov 30, 2015

My take: this should be submitted to https://github.com/erming/tabcomplete and shout can pull in the update from there.

In any case, at the bare minimum this overwriting of the library should only be done as a monkeypatch at runtime - see http://davidwalsh.name/monkey-patching.

@MaxLeiter
Copy link
Contributor

as a note, tab completion is being over-hauled in thelounge/thelounge#787

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants