#662098 Removing line with Ctrl+D sometimes is not undoable

Package:
gedit
Source:
gedit
Description:
popular text editor for the GNOME desktop environment
Submitter:
Patrik Olsson
Date:
2013-12-14 17:15:16 UTC
Severity:
normal
#662098#5
Date:
2012-03-04 03:26:07 UTC
From:
To:
Sometimes I accidentally press Ctrl+D (which removes the current line)
when I meant Ctrl+S (save document). This used to be fine before (in the
amazing 2.x versions), because I could simply hit Ctrl+Z (to undo) and
then Ctrl+S to save the document as I intended it. In this version
however, sometimes the line is not restored with the undo command. If
I'm lucky, I pressed Ctrl+S just before I accidentally pressed Ctrl+D
and I can undo by re-loading (File -> Revert) the document.

Usually more text is removed after undoing a Ctrl+D command, and some
text end up selected.

It doesn't happen always though. I suspect that it has to do with the
undo history filling up and once that happens undoing Ctrl+D doesn't
work correctly anymore. Undoing it will then present the document as it
was much further back in the undo history (at least that's what I think
it is). I'm also pretty sure that redoing doesn't bring back what I had
before an incorrect undo happens. So I cannot undo a faulty undo. On the
other hand, to be fair, I lose faith in the undo system when this
happens so since I save so often I'll rather just reload the whole
document to be sure nothing has been accidentally removed or readded.

I'll try to be more observant next time it happens so that I can give
more information. Please tell me if you want me to test or look into
something.

Thanks

~ Patrik

#662098#10
Date:
2012-03-04 03:43:26 UTC
From:
To:
severity 662098 normal
thanks

seriously?

#662098#17
Date:
2012-03-04 04:03:18 UTC
From:
To:
Sorry, I thought it was an appropriate severity level. The bug causes
data loss, and I think a package with a bug like this is unsuitable for
stable release (so it should be important that it is noticed and fixed
before wheezy goes stable). I used this guide:

http://www.debian.org/Bugs/Developer#severities

~ Patrik

#662098#22
Date:
2013-11-08 21:52:57 UTC
From:
To:
hey Patrik,

I couldnt reproduce this issue.

Can you confirm this bug again with newer version ? like 3.4.2-1 or 3.8.3-4
?

thanks
Regards
althaser

#662098#27
Date:
2013-12-14 14:54:45 UTC
From:
To:
I forgot to mention Patrik here.
#662098#32
Date:
2013-12-14 17:09:48 UTC
From:
To:
Hmm, I should be subscribed to the bug now. Thought I was.

I haven't used gedit for a long time now, and instead Pluma 1.6.0 from
the MATE Desktop Environment, which is a fork of gedit (2.*, I think).
FWIW, I have no issue with Pluma.

From what I remember it was not easy to reproduce. I know I tried for
several hours different ways. It would only happen when I was not trying
to observe it.

My theory is that the undo stack becomes corrupted in some situation
(for example, pointers are assigned incorrectly). A review of the code
that has to do with undo/redo and line-deletion would probably discover
the bug if it is still there.

~ Patrik