-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Make nick completion case-insensitive #333
Make nick completion case-insensitive #333
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your great work :D
src/sui/sui_completion.c
Outdated
@@ -234,7 +235,15 @@ void sui_completion_complete(SuiCompletion *self, SuiCompletionFunc *func, | |||
DBG_FR("Completion: prefix: '%s', suffix: '%s'", | |||
self->last_prefix, self->last_suffix); | |||
|
|||
|
|||
// Go backward, to remove the prefix | |||
assert(gtk_text_iter_backward_chars(&comp, g_utf8_strlen(self->last_prefix, -1))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why use assert
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No reason in particular, I just don't like to ignore error return values. I can remove it if you prefer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For glib application, we can use g_warn_if_fail
(just warning)or g_return_if_fail
(warn and return).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, done!
e7fe8a9
to
73bd861
Compare
Closes GH-305.