After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 626797 - avoid unnecessary undo items
avoid unnecessary undo items
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: GUI
git master
Other All
: Normal enhancement
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2010-08-13 08:37 UTC by Andreas J. Guelzow
Modified: 2010-08-14 02:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Andreas J. Guelzow 2010-08-13 08:37:46 UTC
new gnumeric
select A1
enter "a"
select A1
enter "a"
select A1
enter "a"

in 1.10.1 we now have 3 undo items:
1) Typing "a" in Sheet1!A1
2) Editing Style in Sheet1!A1
3) Editing Style in Sheet1!A1

in current git (advertising itself as 1.10.9) we have:
1) Typing "a" in Sheet1!A1
2) Typing "a" in Sheet1!A1
3) Typing "a" in Sheet1!A1

While the current version makes marginally more sense, it would be desirable to just have a single item:
1) Typing "a" in Sheet1!A1
Comment 1 Morten Welinder 2010-08-13 13:58:30 UTC
That worked at some point.

We should detect that nothing is being changed and make no undo item.
Comment 2 Andreas J. Guelzow 2010-08-13 19:23:29 UTC
In 1.10.1 we had code which claimed to do that but apparently that code did not work correctly (anymore?)
Comment 3 Andreas J. Guelzow 2010-08-13 23:44:17 UTC
fixed for expressions
Comment 4 Morten Welinder 2010-08-14 00:07:31 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.
Comment 5 Andreas J. Guelzow 2010-08-14 01:50:41 UTC
I don't see how this is fixed:

1) at best it is trying to work only for single cells

2) in A1 enter 
'abc
'abc
'abc
this yields 3 undo items

3) in A1 enter
'123  with 2 underlined
'123  with 2 underlined
'123  with 2 underlined
this yields 3 undo items
Comment 6 Andreas J. Guelzow 2010-08-14 01:58:52 UTC
(1) is fixed. At least we are now handling ranges as well as single cells.
(3) is fixed

(2) is still outstanding. The problem is that gnm_cell_get_entered_text returns just "abc" if we entered "'abc" but we can't just ignore the ' since we loose the distinction between '123 and 123.
Comment 7 Andreas J. Guelzow 2010-08-14 02:09:57 UTC
(2) is now also fixed

we are still left with strange situations such as 

in A1 enter

123  with 23 bold
123  with 23 bold
123  with 23 bold

Since 123 is a number not a string this results in 3 undo entries where the last 2 claim to be style changes...
Comment 8 Andreas J. Guelzow 2010-08-14 02:47:01 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.