[geary/mjog/composer-autocomplete-fixes: 3/4] Don't set an email autocomplete key when cursor is at beginning
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/mjog/composer-autocomplete-fixes: 3/4] Don't set an email autocomplete key when cursor is at beginning
- Date: Fri, 14 Feb 2020 22:36:47 +0000 (UTC)
commit aa393a154f3e0ad4fb74646176d77dd6fe99915f
Author: Michael Gratton <mike vee net>
Date: Wed Feb 12 13:07:09 2020 +1100
Don't set an email autocomplete key when cursor is at beginning
Fixes the autocomplete showing up again after having just completed an
addresss.
src/client/composer/contact-entry-completion.vala | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/client/composer/contact-entry-completion.vala
b/src/client/composer/contact-entry-completion.vala
index 59a8ec06..9d794d82 100644
--- a/src/client/composer/contact-entry-completion.vala
+++ b/src/client/composer/contact-entry-completion.vala
@@ -125,7 +125,8 @@ public class ContactEntryCompletion : Gtk.EntryCompletion, Geary.BaseInterface {
int current_char = 0;
bool in_quote = false;
while (text.get_next_char(ref next_idx, out c)) {
- if (current_char == cursor_pos) {
+ if (current_char != 0 &&
+ current_char == cursor_pos) {
this.current_key = text.slice(start_idx, next_idx).strip();
this.cursor_at_address = this.address_parts.size;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]