only when when there is something to undo
They hypothesis behind this change is that the undo is undoing an edit that came before, not the temporary edit that appears in insert-close-paren. So, when there are no edits happening (ie when fixup? is #f) then don't undo. This is only a hypothesis because we were not able to find a small code sequence, outside of DrRacket to cause the bad behavior, so possibly there is really more going on here. Thanks to Nadeem Abdul Hamid for finding this fix. Closes PR 13454
This commit is contained in:
parent
e43583c444
commit
f90eb33d67
|
@ -1075,7 +1075,7 @@ added get-regions
|
|||
(cond
|
||||
[(eq? smart-skip 'adjacent)
|
||||
(end-edit-sequence) ;; wraps up the net-zero editing changes done by get-close-paren etc.
|
||||
(undo) ;; to avoid messing up the editor's modified state in case of a simple skip
|
||||
(when fixup? (undo)) ;; to avoid messing up the editor's modified state in case of a simple skip
|
||||
(if (and next-close-start next-close-adj?
|
||||
(string=? insert-str next-close-str))
|
||||
(skip next-close-end)
|
||||
|
|
Loading…
Reference in New Issue
Block a user