[geary/wip/ricotz/vala: 11/11] Accept string.index_of_nth_char() to return long or int for new valac



commit 6272e93b0c308fde65b1dd5f69d0acfecc13b8b6
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Mon Oct 29 20:41:57 2018 +0100

    Accept string.index_of_nth_char() to return long or int for new valac

 src/client/composer/contact-entry-completion.vala | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/client/composer/contact-entry-completion.vala 
b/src/client/composer/contact-entry-completion.vala
index f999b7b1..45633197 100644
--- a/src/client/composer/contact-entry-completion.vala
+++ b/src/client/composer/contact-entry-completion.vala
@@ -123,7 +123,7 @@ public class ContactEntryCompletion : Gtk.EntryCompletion {
             return empty_addresses;
         
         int cursor_position = entry.cursor_position;
-        int cursor_offset = original_text.index_of_nth_char(cursor_position);
+        var cursor_offset = original_text.index_of_nth_char(cursor_position);
         if (cursor_offset < 0)
             return empty_addresses;
         
@@ -136,7 +136,7 @@ public class ContactEntryCompletion : Gtk.EntryCompletion {
         if (addresses.size < 1)
             return empty_addresses;
         
-        int bytes_seen_so_far = 0;
+        long bytes_seen_so_far = 0L;
         current_address_index = addresses.size - 1;
         for (int i = 0; i < addresses.size; i++) {
             int token_bytes = addresses[i].length + delimiter.length;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]