mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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.
This commit is contained in:
parent
06110e2abd
commit
190d5f1a61
@ -198,7 +198,7 @@ gnc_quickfill_cell_modify_verify (BasicCell *_cell,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* If we are inserting in the middle, just accept */
|
/* 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_basic_cell_set_value_internal (&cell->cell, newval);
|
||||||
gnc_quickfill_cell_set_original (cell, NULL);
|
gnc_quickfill_cell_set_original (cell, NULL);
|
||||||
@ -233,8 +233,6 @@ gnc_quickfill_cell_modify_verify (BasicCell *_cell,
|
|||||||
if (cell->original != NULL)
|
if (cell->original != NULL)
|
||||||
newval = cell->original;
|
newval = cell->original;
|
||||||
|
|
||||||
*cursor_position = -1;
|
|
||||||
|
|
||||||
gnc_basic_cell_set_value_internal (&cell->cell, newval);
|
gnc_basic_cell_set_value_internal (&cell->cell, newval);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user