System undo functionality vs. Atom undo/redo functionality


#1

Systems, including OSX in this case, typically implement a “grouped” undo, such that:

I expect:

Type “asdfasdf” really quickly, hit undo, entire string is removed.

Actual:
Type “asdfasdf” really quickly, hit undo, only the trailing “f” is removed.

I’d also expect this to work with selections (select “thing”, type, undo quickly, “thing” should be restored).


Undo - why only one character at a time?
#2

It would also be nice to have something to make API calls “atomic”, such that an undo will undo them all at once, not step by step. Consider the following code for transposing lines:

transposeLines: ->
  editor = @getActiveEditor()

  editor.moveCursorToBeginningOfLine()
  editor.cutToEndOfLine()
  editor.moveCursorUp()
  @openLine()
  editor.pasteText()
  editor.moveCursorToBeginningOfLine()
  editor.indent()
  editor.moveCursorDown()
  editor.moveCursorToBeginningOfLine()
  editor.indent()
  editor.moveCursorDown()
  editor.deleteLine()

#3

#4

Thanks. I have updated my package as soon as that was released.

However, I think OP’s expectation is still unmet. When I type “asdfasdfasdf” and hit undo, I still have to do it for each letter I typed even if I typed the word really quickly.


#5

+1

The current undo-functionality is basically useless. And if the API already contains transactions, it shouldn’t be that hard to do, right? :wink:

(Or, with an open-source core someone not on the core team could fix it ;))


#6

Two months ago Matt Colyer mentioned on GitHub that there was an issue open in Core to fix this behavior.

Is there any progress? Undo is indeed very frustrating on Atom.


#7

The thing that bothers me the most is that a save blows away the undo buffer. I get killed by that all the time.


#8

I just tried out Atom, everything else was great but this really turned me down.
It’s such a basic feature and really should be fixed.


#9

That doesn’t happen to me. Which version of Atom are you using? I’m on 0.120.0.


#10

I tested and save didn’t kill it. What was bothering me was reload. I’m used to web development where the dev cycle doesn’t kill it.

Maybe I’ll work on a persistent undo/redo.


#11

I just want to chime in to say that I also feel strongly about this getting fixed. This is one of the basic tasks of a text editor which Atom isn’t doing as it should.


#12

:+1: to fixing this. It’s a huge pain when undoing a lot of changes at once.


#13

I agree. Please fix.


#14

If you look at the pinned topic describing the Atom Roadmap:

You’ll see that there is a tracking issue for the things that, at this point in time, they intend to include in v1.0:

One of the things on that list is:


Disclaimer: I am not an employee of GitHub nor a member of the Atom team.


#15

This is now fixed in v0.143.0:

Closing in 24 hours unless there are more comments …


#16

This topic was automatically closed count} hours after the last reply. New replies are no longer allowed.