From ed2b92c428ce55e8466033d245412b72bbab879b Mon Sep 17 00:00:00 2001 From: Robert Fewell <14uBobIT@gmail.com> Date: Mon, 19 Jun 2023 09:34:12 +0100 Subject: [PATCH] Fix cursor position when deleting selected text --- gnucash/register/register-gnome/completioncell-gnome.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gnucash/register/register-gnome/completioncell-gnome.c b/gnucash/register/register-gnome/completioncell-gnome.c index c4bc0aaceb..6136200854 100644 --- a/gnucash/register/register-gnome/completioncell-gnome.c +++ b/gnucash/register/register-gnome/completioncell-gnome.c @@ -666,6 +666,10 @@ gnc_completion_cell_modify_verify (BasicCell* bcell, box->stop_searching = FALSE; } + // Are were deleting or inserting in the middle. + if (change == NULL || *cursor_position < bcell->value_chars) + *start_selection = *end_selection = *cursor_position; + populate_list_store (cell, newval); if (g_strcmp0 (newval, "") == 0)