I’m trying to define a new command for joining the current line with the line above. So far, I have made it work as expected with the following code:
atom.commands.add 'atom-text-editor', 'custom:join-line-above', (e) -> return unless editor = atom.workspace.getActiveTextEditor() editor.moveUp() editor.joinLines()
However, one issue arises: when undoing the command, I have to press
ctrl+z twice because atom recognizes the last action as two commands, instead of just one.
Does anyone know how to handle this?