You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If reformat-as-you-type is engaged, and you use paredit backspace or deleteForward to remove an empty list (which triggers reformat-as-you-type, if it's engaged), and the reformatter changes the document text (which it doesn't always), then you need to use Undo twice to get the empty list back.
For example, start with a flush-left outer form that contains an overly-indented line with an empty list; cursor positioned inside the empty list:
(do
42 (|))
Backspace; now you have
(do
42 |)
Undo once:
(do
42 )
Undo again:
(do
42 (|))
On the other hand, if reformat-as-you-type only moves the cursor, without changing the document text, then one Undo is enough: start with
(do
42 (|),,,)
Backspace
(do
42 ,,,|)
Undo just once, and it restores the empty list.
The text was updated successfully, but these errors were encountered:
This might be a conflict between the resolution of #2611 and Calva's format-as-you-type. The same problem can be induced for another paredit command (slurp forward) by removing the undoStopAfter:false override from DocumentModel.edit. Backspace and deleteForward, which as of #2611 are registered with registerTextEditorCommand, do not control the undoStop settings of the TextEditorEdit that they receive from VS Code.
If reformat-as-you-type is engaged, and you use paredit backspace or deleteForward to remove an empty list (which triggers reformat-as-you-type, if it's engaged), and the reformatter changes the document text (which it doesn't always), then you need to use Undo twice to get the empty list back.
For example, start with a flush-left outer form that contains an overly-indented line with an empty list; cursor positioned inside the empty list:
Backspace; now you have
Undo once:
Undo again:
On the other hand, if reformat-as-you-type only moves the cursor, without changing the document text, then one Undo is enough: start with
Backspace
Undo just once, and it restores the empty list.
The text was updated successfully, but these errors were encountered: