gnucash maint: Bug 797971 - Inserting description text behaves oddly
Robert Fewell
bobit at code.gnucash.org
Thu Oct 15 10:34:07 EDT 2020
Updated via https://github.com/Gnucash/gnucash/commit/190d5f1a (commit)
from https://github.com/Gnucash/gnucash/commit/06110e2a (commit)
commit 190d5f1a616791deaaf68e9a86eebba67bcae193
Author: Robert Fewell <14uBobIT at gmail.com>
Date: Thu Oct 15 15:21:05 2020 +0100
Bug 797971 - Inserting description text behaves oddly
This is best observed when trying to insert a character, say x when the
cursor is before the last character, the cursor will jump to the end
like... ABCD|E results in ABCDxE|
It can also affect when inserting/changing text that has come from the
quick fill the cursor may end up in the wrong place.
Changed a test condition to use the incoming new character length value
instead of the existing cell one.
diff --git a/gnucash/register/register-core/quickfillcell.c b/gnucash/register/register-core/quickfillcell.c
index 39332eeab..f1d4817b1 100644
--- a/gnucash/register/register-core/quickfillcell.c
+++ b/gnucash/register/register-core/quickfillcell.c
@@ -198,7 +198,7 @@ gnc_quickfill_cell_modify_verify (BasicCell *_cell,
}
/* If we are inserting in the middle, just accept */
- if (*cursor_position < _cell->value_chars)
+ if (*cursor_position < newval_chars)
{
gnc_basic_cell_set_value_internal (&cell->cell, newval);
gnc_quickfill_cell_set_original (cell, NULL);
@@ -233,8 +233,6 @@ gnc_quickfill_cell_modify_verify (BasicCell *_cell,
if (cell->original != NULL)
newval = cell->original;
- *cursor_position = -1;
-
gnc_basic_cell_set_value_internal (&cell->cell, newval);
return;
}
Summary of changes:
gnucash/register/register-core/quickfillcell.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
More information about the gnucash-changes
mailing list