Skip to content

Commit

Permalink
Fix cursor position when deleting selected text
Browse files Browse the repository at this point in the history
  • Loading branch information
Bob-IT committed Jun 20, 2023
1 parent b331ec9 commit ed2b92c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gnucash/register/register-gnome/completioncell-gnome.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ed2b92c

Please sign in to comment.