Issue 1:
Using the editor:move-line-up command while editing a markdown document caused the line highlighted to disappear and the following error to be thrown.

TypeError: Cannot read property 'isComment' of undefined
at TokenizedBuffer.module.exports.TokenizedBuffer.isFoldableCodeAtRow (/usr/share/atom/resources/app.asar/src/tokenized-buffer.js:429:71)
at TokenizedBuffer.module.exports.TokenizedBuffer.isFoldableAtRow (/usr/share/atom/resources/app.asar/src/tokenized-buffer.js:424:19)
at TokenizedBuffer.module.exports.TokenizedBuffer.updateFoldableStatus (/usr/share/atom/resources/app.asar/src/tokenized-buffer.js:412:25)
at TokenizedBuffer.module.exports.TokenizedBuffer.handleBufferChange (/usr/share/atom/resources/app.asar/src/tokenized-buffer.js:377:20)
at /usr/share/atom/resources/app.asar/src/tokenized-buffer.js:62:24
at Emitter.module.exports.Emitter.emit (/usr/share/atom/resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
at TextBuffer.module.exports.TextBuffer.applyChange (/usr/share/atom/resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:624:20)
at TextBuffer.module.exports.TextBuffer.revertToCheckpoint (/usr/share/atom/resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:789:16)
at TextBuffer.module.exports.TextBuffer.transact (/usr/share/atom/resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:753:14)
at TextEditor.module.exports.TextEditor.transact (/usr/share/atom/resources/app.asar/src/text-editor.js:1136:26)

Issue 2:
Editing an unsaved .xml file

Atom Version: 0.182.0

System: linux 3.18.6-1-ARCH

Thrown From: Atom Core

Stack Trace

Uncaught TypeError: Cannot read property 'isComment' of undefined

At /usr/share/atom/resources/app/src/tokenized-buffer.js:401

TypeError: Cannot read property 'isComment' of undefined
at TokenizedBuffer.module.exports.TokenizedBuffer.isFoldableCodeAtRow (/usr/share/atom/resources/app/src/tokenized-buffer.js:401:71)
at TokenizedBuffer.module.exports.TokenizedBuffer.isFoldableAtRow (/usr/share/atom/resources/app/src/tokenized-buffer.js:396:19)
at TokenizedBuffer.module.exports.TokenizedBuffer.updateFoldableStatus (/usr/share/atom/resources/app/src/tokenized-buffer.js:384:25)
at TokenizedBuffer.module.exports.TokenizedBuffer.handleBufferChange (/usr/share/atom/resources/app/src/tokenized-buffer.js:351:20)
at /usr/share/atom/resources/app/src/tokenized-buffer.js:56:24
at Emitter.module.exports.Emitter.emit (/usr/share/atom/resources/app/node_modules/event-kit/lib/emitter.js:82:11)
at TextBuffer.module.exports.TextBuffer.applyPatch (/usr/share/atom/resources/app/node_modules/text-buffer/lib/text-buffer.js:594:20)
at BufferPatch.module.exports.BufferPatch.applyTo (/usr/share/atom/resources/app/node_modules/text-buffer/lib/buffer-patch.js:74:21)
at Transaction.module.exports.Transaction.applyTo (/usr/share/atom/resources/app/node_modules/text-buffer/lib/transaction.js:60:29)
at History.module.exports.History.abortTransaction (/usr/share/atom/resources/app/node_modules/text-buffer/lib/history.js:165:24)
at History.module.exports.History.transact (/usr/share/atom/resources/app/node_modules/text-buffer/lib/history.js:122:16)
at TextBuffer.module.exports.TextBuffer.transact (/usr/share/atom/resources/app/node_modules/text-buffer/lib/text-buffer.js:687:27)
at TextEditor.module.exports.TextEditor.transact (/usr/share/atom/resources/app/src/text-editor.js:1195:26)
at atom-text-editor.newCommandListeners.(anonymous function) (/usr/share/atom/resources/app/src/text-editor-element.js:304:22)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app/src/command-registry.js:243:29)
at /usr/share/atom/resources/app/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/share/atom/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:558:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/share/atom/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:396:22)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/usr/share/atom/resources/app/src/window-event-handler.js:176:20)

Commands

3x -1:41.5 editor:newline (atom-text-editor.editor.is-focused)
-1:33.4 core:backspace (atom-text-editor.editor.is-focused)
-1:31.2 autocomplete:toggle (atom-text-editor.editor.is-focused)
-1:29.8 core:move-up (atom-text-editor.editor.is-focused)
-1:20.2 core:backspace (atom-text-editor.editor.is-focused)
-0:00.6 editor:newline (atom-text-editor.editor.is-focused)

Config

{
"core": {
"destroyEmptyPanes": false
},
"editor": {
"invisibles": {}
}
}

Installed Packages

# User
atom-beautify, v0.21.3
file-icons, v1.5.1
linter, v0.12.0
linter-xmllint, v0.0.5
xml-formatter, v0.8.1

# Dev
No dev packages