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 326622 - Undo manager rewriting
Undo manager rewriting
Status: RESOLVED INCOMPLETE
Product: gtksourceview
Classification: Platform
Component: General
git master
Other All
: Normal enhancement
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks: 307757 312653 315116 317413
 
 
Reported: 2006-01-11 15:58 UTC by Paolo Maggi
Modified: 2009-12-29 15:19 UTC
See Also:
GNOME target: ---
GNOME version: ---



Comment 1 Jeroen Zwartepoorte 2006-01-23 10:54:15 UTC
Just so it doesn't get missed: the new highlighting engine introduces new signals for buffer inserts & deletes. The undomanager should listen for these signals instead of the GtkTextBuffer signals since the code folding integration behavior is that sometimes a delete/insert doesn't actually result in characters being deleted/inserted, just the fold expanding. (when the cursor is in a part of a collapsed fold, don't insert/delete a character there, just expand the fold).
Comment 2 Yevgen Muntyan 2006-07-26 16:09:56 UTC
(In reply to comment #1)
> Just so it doesn't get missed: the new highlighting engine introduces new
> signals for buffer inserts & deletes. 

Those signals have gone.
Comment 3 Yevgen Muntyan 2006-07-26 16:28:15 UTC
(In reply to comment #1)
> the code folding integration
> behavior is that sometimes a delete/insert doesn't actually result in
> characters being deleted/inserted, just the fold expanding. (when the cursor is
> in a part of a collapsed fold, don't insert/delete a character there, just
> expand the fold).

What do you mean here, by the way? insert-text and delete-range may not be stopped by folding. Backspace pressed may or may not delete a character, but the delete-range signal doesn't carry any information about what happened, it may or may not be interactive.

Comment 4 Jeroen Zwartepoorte 2006-07-26 16:47:01 UTC
What i mean is this: when the cursor is inside a folded block of text, pressing backspace, or delete doesn't actually delete anything. It just expands the fold. Example:


/** this is a multiline b|lock folded... */

/** this is a multiline b|lock folded...
 * which is now expanded. */

| is where the cursor is.
Comment 5 Yevgen Muntyan 2006-07-26 16:51:55 UTC
(In reply to comment #4)
> What i mean is this: when the cursor is inside a folded block of text, pressing
> backspace, or delete doesn't actually delete anything. It just expands the
> fold. Example:
> 
> 
> /** this is a multiline b|lock folded... */
> 
> /** this is a multiline b|lock folded...
>  * which is now expanded. */
> 
> | is where the cursor is.
> 

I understood this. But, do you actually stop delete-range emission (if yes, it's a bug)?
Comment 6 Jeroen Zwartepoorte 2006-07-26 18:19:33 UTC
I forget how i've implemented it exactly on the folding branch. If you know how to do it properly and it's possible with the new code, then it's fine by me.
Comment 7 Paolo Borelli 2009-12-29 15:19:35 UTC
No point keeping this generic bug open... beside there are generic "undo framework" bugs in gtk and ideally an improved undo manager belongs there.