Change the search text to be up to the cursor position

When editing an existing entry, similar descriptions would not show so
instead of using the whole of the description text to search on just
use the portion up to the cursor.
This commit is contained in:
Robert Fewell 2023-06-19 09:43:19 +01:00
parent ed2b92c428
commit 59ec7e4613

View File

@ -670,7 +670,9 @@ gnc_completion_cell_modify_verify (BasicCell* bcell,
if (change == NULL || *cursor_position < bcell->value_chars)
*start_selection = *end_selection = *cursor_position;
populate_list_store (cell, newval);
gchar *start_of_text = g_utf8_substring (newval, 0, *cursor_position);
populate_list_store (cell, start_of_text);
g_free (start_of_text);
if (g_strcmp0 (newval, "") == 0)
{