<ol dir="auto">
<li>Make lots of changes to a file.</li>
<li>Undo a lot of times.</li>
</ol>
<p dir="auto"><strong>Atom Version</strong>: 0.186.0<br>
<strong>System</strong>: Mac OS X 10.9.5<br>
<strong>Thrown From</strong>: Atom Core</p>
<h3 dir="auto">Stack Trace</h3>
<p dir="auto">Uncaught TypeError: Cannot read property 'slice' of undefined</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="At /Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:559

TypeError: Cannot read property 'slice' of undefined
  at TextBuffer.module.exports.TextBuffer.applyPatch (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:559:41)
  at BufferPatch.module.exports.BufferPatch.applyTo (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/buffer-patch.js:74:21)
  at Transaction.module.exports.Transaction.applyTo (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/transaction.js:60:29)
  at History.module.exports.History.undo (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/history.js:87:24)
  at TextBuffer.module.exports.TextBuffer.undo (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:679:27)
  at TextEditor.module.exports.TextEditor.undo (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1206:26)
  at TextEditor.atom.commands.add.stopEventPropagation.core:undo (/Applications/Atom.app/Contents/Resources/app/src/text-editor-element.js:312:19)
  at atom-text-editor.newCommandListeners.(anonymous function) (/Applications/Atom.app/Contents/Resources/app/src/text-editor-element.js:280:32)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:243:29)
  at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:558:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:396:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:182:20)
"><pre class="notranslate"><code class="notranslate">At /Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:559

TypeError: Cannot read property 'slice' of undefined
  at TextBuffer.module.exports.TextBuffer.applyPatch (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:559:41)
  at BufferPatch.module.exports.BufferPatch.applyTo (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/buffer-patch.js:74:21)
  at Transaction.module.exports.Transaction.applyTo (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/transaction.js:60:29)
  at History.module.exports.History.undo (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/history.js:87:24)
  at TextBuffer.module.exports.TextBuffer.undo (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:679:27)
  at TextEditor.module.exports.TextEditor.undo (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1206:26)
  at TextEditor.atom.commands.add.stopEventPropagation.core:undo (/Applications/Atom.app/Contents/Resources/app/src/text-editor-element.js:312:19)
  at atom-text-editor.newCommandListeners.(anonymous function) (/Applications/Atom.app/Contents/Resources/app/src/text-editor-element.js:280:32)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:243:29)
  at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:558:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:396:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:182:20)

</code></pre></div>
<h3 dir="auto">Commands</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="     -8:31.5 core:backspace (atom-text-editor.editor.is-focused)
  2x -8:30.3 core:save (atom-text-editor.editor.is-focused)
  4x -1:15.7 core:move-right (atom-text-editor.editor.mini)
     -1:13.9 core:confirm (atom-text-editor.editor.mini)
undefined -1:10.7 core:undo (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
  9x -0:23.1 core:redo (atom-text-editor.editor.is-focused)
  8x -0:07.7 core:undo (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-monokai.theme-atom-dark-ui)"><pre class="notranslate"><code class="notranslate">     -8:31.5 core:backspace (atom-text-editor.editor.is-focused)
  2x -8:30.3 core:save (atom-text-editor.editor.is-focused)
  4x -1:15.7 core:move-right (atom-text-editor.editor.mini)
     -1:13.9 core:confirm (atom-text-editor.editor.mini)
undefined -1:10.7 core:undo (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
  9x -0:23.1 core:redo (atom-text-editor.editor.is-focused)
  8x -0:07.7 core:undo (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-monokai.theme-atom-dark-ui)
</code></pre></div>
<h3 dir="auto">Config</h3>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
  &quot;core&quot;: {
    &quot;excludeVcsIgnoredPaths&quot;: false,
    &quot;themes&quot;: [
      &quot;atom-dark-ui&quot;,
      &quot;monokai&quot;
    ]
  },
  &quot;editor&quot;: {
    &quot;showInvisibles&quot;: true,
    &quot;invisibles&quot;: {}
  }
}"><pre class="notranslate">{
  <span class="pl-ent">"core"</span>: {
    <span class="pl-ent">"excludeVcsIgnoredPaths"</span>: <span class="pl-c1">false</span>,
    <span class="pl-ent">"themes"</span>: [
      <span class="pl-s"><span class="pl-pds">"</span>atom-dark-ui<span class="pl-pds">"</span></span>,
      <span class="pl-s"><span class="pl-pds">"</span>monokai<span class="pl-pds">"</span></span>
    ]
  },
  <span class="pl-ent">"editor"</span>: {
    <span class="pl-ent">"showInvisibles"</span>: <span class="pl-c1">true</span>,
    <span class="pl-ent">"invisibles"</span>: {}
  }
}</pre></div>
<h3 dir="auto">Installed Packages</h3>
<div class="highlight highlight-source-coffee notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# User
atom-beautify, v0.21.3
compare-files, v0.4.1
emmet, v2.3.4
language-ejs, v0.1.0
monokai, v0.12.0

# Dev
No dev packages"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> User</span>
atom<span class="pl-k">-</span>beautify, v0.<span class="pl-ii">21</span>.<span class="pl-ii">3</span>
compare<span class="pl-k">-</span>files, v0.<span class="pl-ii">4</span>.<span class="pl-ii">1</span>
emmet, v2.<span class="pl-ii">3</span>.<span class="pl-ii">4</span>
language<span class="pl-k">-</span>ejs, v0.<span class="pl-ii">1</span>.<span class="pl-ii">0</span>
monokai, v0.<span class="pl-ii">12</span>.<span class="pl-ii">0</span>

<span class="pl-c"><span class="pl-c">#</span> Dev</span>
<span class="pl-en">No</span> <span class="pl-en">dev</span> packages</pre></div>
<h3 dir="auto">Steps To Reproduce:</h3>
<ul dir="auto">
<li>Create an __ init __.py in a python package</li>
<li>Try to add a few new lines by typing enter (I can't have more than two lines)</li>
</ul>
<h3 dir="auto">Error</h3>
<p dir="auto">Uncaught TypeError: Cannot read property  slice  of undefined <strong>Atom Version</strong>: 0.158.0 <strong>System</strong>: linux 3.13.0-43-generic <strong>Thrown From</strong>: Atom Core</p>
<h3 dir="auto">Stack Trace</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="At /usr/share/atom/resources/app/node_modules/text-buffer/lib/text-buffer.js:557

TypeError: Cannot read property 'slice' of undefined
  at TextBuffer.module.exports.TextBuffer.applyPatch (/usr/share/atom/resources/app/node_modules/text-buffer/lib/text-buffer.js:557:39)
  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:162:24)
  at History.module.exports.History.transact (/usr/share/atom/resources/app/node_modules/text-buffer/lib/history.js:119:16)
  at TextBuffer.module.exports.TextBuffer.transact (/usr/share/atom/resources/app/node_modules/text-buffer/lib/text-buffer.js:683:27)
  at TextEditor.module.exports.TextEditor.transact (/usr/share/atom/resources/app/src/text-editor.js:1146:26)
  at atom-text-editor.newCommandListeners.(anonymous function) (/usr/share/atom/resources/app/src/text-editor-element.js:290: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:549:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/share/atom/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:391:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/usr/share/atom/resources/app/src/window-event-handler.js:167:20)"><pre class="notranslate"><code class="notranslate">At /usr/share/atom/resources/app/node_modules/text-buffer/lib/text-buffer.js:557

TypeError: Cannot read property 'slice' of undefined
  at TextBuffer.module.exports.TextBuffer.applyPatch (/usr/share/atom/resources/app/node_modules/text-buffer/lib/text-buffer.js:557:39)
  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:162:24)
  at History.module.exports.History.transact (/usr/share/atom/resources/app/node_modules/text-buffer/lib/history.js:119:16)
  at TextBuffer.module.exports.TextBuffer.transact (/usr/share/atom/resources/app/node_modules/text-buffer/lib/text-buffer.js:683:27)
  at TextEditor.module.exports.TextEditor.transact (/usr/share/atom/resources/app/src/text-editor.js:1146:26)
  at atom-text-editor.newCommandListeners.(anonymous function) (/usr/share/atom/resources/app/src/text-editor-element.js:290: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:549:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/share/atom/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:391:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/usr/share/atom/resources/app/src/window-event-handler.js:167:20)
</code></pre></div>