New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be smart about case-matching the nicks. #488

Merged
merged 3 commits into from Jun 14, 2016

Conversation

Projects
None yet
2 participants
@LemonBoy
Member

LemonBoy commented Jun 6, 2016

Not very sure about this, we might want to gate this behaviour under a configurable option...
Long story short, it makes the completion match the case of the user-typed prefix if it contains at least an uppercase letter, I found it quite disappointing that Ne<tab> didn't give Nei but another nick starting with a lowercase n.

@ailin-nemui

This comment has been minimized.

Contributor

ailin-nemui commented Jun 7, 2016

maybe a tristate /set completion_nicks_matchcase uppercase/always/never ?

@LemonBoy

This comment has been minimized.

Member

LemonBoy commented Jun 7, 2016

Yeah, I'd use YES/NO/AUTO as options though.

@ailin-nemui

This comment has been minimized.

Contributor

ailin-nemui commented Jun 9, 2016

can you check this vs. rejoin_channels_on_reconnect and make sure we use the same code paths in all cases

@@ -52,6 +58,18 @@ static int completion_auto, completion_strict;
last_msg_add(&((MODULE_CHANNEL_REC *) MODULE_DATA(channel))->lastmsgs, \
nick, own, keep_publics_count)
static int contains_uppercase(const char *s1)

This comment has been minimized.

@ailin-nemui

ailin-nemui Jun 11, 2016

Contributor

gboolean

* 1 = Match the case
* 2 = Don't match the case unless the user typed at least a uppercase letter
*/
static int completion_match_case;

This comment has been minimized.

@ailin-nemui

ailin-nemui Jun 11, 2016

Contributor

let's use enum constants?

LemonBoy added some commits Jun 6, 2016

Be smart about case-matching the nicks.
If the prefix contains an uppercase letter then don't use the
case-insensitive search functions.

@ailin-nemui ailin-nemui merged commit 700a0d5 into irssi:master Jun 14, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@LemonBoy LemonBoy deleted the LemonBoy:completion_smart branch Jul 14, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment