t9md / atom-vim-mode-plus

vim-mode improved
https://atom.io/packages/vim-mode-plus
MIT License
1.4k stars 112 forks source link

Put from Undefined Register Throws Error #656

Closed dcalhoun closed 7 years ago

dcalhoun commented 7 years ago

Steps to Reproduce

  1. Do not define "z" register
  2. Put "z" register: Shift+' z p

Atom Version: 1.13.0 Electron Version: 1.3.13 System: Mac OS X 10.12.2 Thrown From: vim-mode-plus package, v0.79.1

Stack Trace

Uncaught TypeError: Cannot read property 'start' of undefined

At /Users/davidcalhoun/.atom/packages/vim-mode-plus/lib/operation-stack.coffee:120

TypeError: Cannot read property 'start' of undefined
    at PutAfter.PutBefore.adjustCursorPosition (/Users/davidcalhoun/.atom/packages/vim-mode-plus/lib/operator.coffee:616:8)
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:129:28)
    at VimState.module.exports.VimState.emitDidFinishMutation (/Users/davidcalhoun/.atom/packages/vim-mode-plus/lib/vim-state.coffee:160:38)
    at PutAfter._results.push._this.(anonymous function) [as emitDidFinishMutation] (/Users/davidcalhoun/.atom/packages/vim-mode-plus/node_modules/delegato/lib/delegator.js:67:61)
    at PutAfter.Operator.startMutation (/Users/davidcalhoun/.atom/packages/vim-mode-plus/lib/operator.coffee:243:6)
    at PutAfter.Operator.execute (/Users/davidcalhoun/.atom/packages/vim-mode-plus/lib/operator.coffee:247:6)
    at PutAfter.PutBefore.execute (/Users/davidcalhoun/.atom/packages/vim-mode-plus/lib/operator.coffee:611:5)
    at OperationStack.execute (/Users/davidcalhoun/.atom/packages/vim-mode-plus/lib/operation-stack.coffee:151:27)
    at OperationStack.process (/Users/davidcalhoun/.atom/packages/vim-mode-plus/lib/operation-stack.coffee:140:8)
    at OperationStack.run (/Users/davidcalhoun/.atom/packages/vim-mode-plus/lib/operation-stack.coffee:83:10)
    at atom-text-editor.<anonymous> (/Users/davidcalhoun/.atom/packages/vim-mode-plus/lib/base.coffee:328:33)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:259:29)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:59
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:587:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:382:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:106:36)
    at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:59)

Commands

     -0:17.5.0 vim-mode-plus:undo (input.hidden-input)
     -0:16.8.0 vim-mode-plus:set-register-name (input.hidden-input)
     -0:16.6.0 vim-mode-plus:set-input-char-b (input.hidden-input)
     -0:16.5.0 vim-mode-plus:put-after (input.hidden-input)
     -0:15.7.0 vim-mode-plus:reset-normal-mode (input.hidden-input)
     -0:13.4.0 vim-mode-plus:set-register-name (input.hidden-input)
     -0:13.2.0 vim-mode-plus:set-input-char-c (input.hidden-input)
     -0:13 vim-mode-plus:put-after (input.hidden-input)
     -0:09.1.0 vim-mode-plus:reset-normal-mode (input.hidden-input)
  2x -0:08.9.0 vim-mode-plus:move-up (input.hidden-input)
     -0:08.5.0 vim-mode-plus:set-register-name (input.hidden-input)
     -0:08.4.0 vim-mode-plus:set-input-char-b (input.hidden-input)
     -0:08.3.0 vim-mode-plus:put-after (input.hidden-input)
     -0:00.3.0 vim-mode-plus:set-register-name (input.hidden-input)
     -0:00.1.0 vim-mode-plus:set-input-char-z (input.hidden-input)
     -0:00.0 vim-mode-plus:put-after (input.hidden-input)

Config

{
  "core": {
    "customFileTypes": {
      "source.ini": [
        ".buckconfig",
        ".flowconfig",
        ".hgrc"
      ],
      "source.json": [
        ".arcconfig",
        "BUCK.autodeps"
      ],
      "source.python": [
        "BUCK"
      ]
    },
    "destroyEmptyPanes": false,
    "disabledPackages": [
      "pain-split",
      "inline-autocomplete",
      "autoclose-html",
      "autocomplete",
      "autocomplete-paths",
      "ember-cli-helper",
      "atom-handlebars",
      "maximize-panes",
      "smart-tab-name",
      "ember-tabs",
      "aligner",
      "pigments",
      "language-postcss",
      "ex-mode",
      "nuclide"
    ],
    "ignoredNames": [
      ".git",
      ".sass-cache",
      ".DS_Store",
      "tmp",
      ".publish"
    ],
    "openEmptyEditorOnStart": false,
    "packagesWithKeymapsDisabled": [
      "tree-view"
    ],
    "telemetryConsent": "limited"
  },
  "vim-mode-plus": {
    "charactersToAddSpaceOnSurround": [
      "(",
      "[",
      "{",
      "<"
    ],
    "clearHighlightSearchOnResetNormalMode": true,
    "clearPersistentSelectionOnResetNormalMode": true,
    "hideTabBarOnMaximizePane": false,
    "highlightSearch": true,
    "smoothScrollOnFullScrollMotionDuration": 150,
    "smoothScrollOnHalfScrollMotionDuration": 150,
    "statusBarModeStringStyle": "long",
    "stayOnDelete": true,
    "stayOnTransformString": true,
    "stayOnYank": true,
    "useClipboardAsDefaultRegister": true
  }
}

Installed Packages

# User
.bin, vundefined (inactive)
atom-wrap-in-tag, v0.6.0 (inactive)
csscomb, v0.3.1 (inactive)
duotone-dark-forest-syntax, v2.1.0 (inactive)
duotone-dark-space-syntax, v2.1.0 (inactive)
duotone-dark-syntax, v2.1.0 (inactive)
ex-mode, v0.13.1 (inactive)
file-icons, v2.0.9 (active)
highlight-line, v0.12.0 (active)
language-diff, v0.7.0 (active)
language-generic-config, v1.3.0 (active)
language-liquid, v0.5.1 (active)
language-postcss, v1.3.0 (inactive)
linter, v1.11.21 (active)
linter-coffeelint, v1.2.1 (active)
linter-js-standard, v3.7.0 (active)
linter-stylelint, v3.7.0 (active)
nerd-treeview, v0.4.3 (active)
one-dark-vivid-syntax, v1.7.1 (inactive)
react, v0.16.2 (active)
sort-lines, v0.14.0 (inactive)
standardjs-snippets, v2.5.0 (inactive)
tabs-to-spaces, v1.0.3 (active)
vim-mode-plus, v0.79.1 (active)
vim-mode-plus-ex-mode, v0.7.1 (inactive)
Zen, v0.16.4 (inactive)
atom-dark-syntax, v0.28.0 (inactive)
atom-dark-ui, v0.53.0 (inactive)
atom-light-syntax, v0.29.0 (inactive)
atom-light-ui, v0.46.0 (inactive)
base16-tomorrow-dark-theme, v1.4.0 (inactive)
base16-tomorrow-light-theme, v1.4.0 (inactive)
one-dark-ui, v1.8.2 (active)
one-light-ui, v1.8.2 (inactive)
one-dark-syntax, v1.6.0 (active)
one-light-syntax, v1.6.0 (inactive)
solarized-dark-syntax, v1.1.1 (inactive)
solarized-light-syntax, v1.1.1 (inactive)
about, v1.7.2 (active)
archive-view, v0.62.0 (active)
autocomplete-atom-api, v0.10.0 (active)
autocomplete-css, v0.14.1 (active)
autocomplete-html, v0.7.2 (active)
autocomplete-plus, v2.33.1 (active)
autocomplete-snippets, v1.11.0 (active)
autoflow, v0.29.0 (inactive)
autosave, v0.23.2 (active)
background-tips, v0.26.1 (active)
bookmarks, v0.43.2 (active)
bracket-matcher, v0.85.1 (active)
command-palette, v0.39.1 (active)
deprecation-cop, v0.55.1 (active)
dev-live-reload, v0.47.0 (active)
encoding-selector, v0.22.0 (active)
exception-reporting, v0.40.0 (active)
find-and-replace, v0.204.5 (active)
fuzzy-finder, v1.4.0 (active)
git-diff, v1.2.0 (active)
go-to-line, v0.31.2 (inactive)
grammar-selector, v0.48.2 (active)
image-view, v0.60.0 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.1 (active)
link, v0.31.2 (inactive)
markdown-preview, v0.159.1 (active)
metrics, v1.1.2 (active)
notifications, v0.65.1 (active)
open-on-github, v1.2.1 (active)
package-generator, v1.0.2 (inactive)
settings-view, v0.244.0 (active)
snippets, v1.0.4 (active)
spell-check, v0.68.5 (active)
status-bar, v1.6.0 (active)
styleguide, v0.48.0 (active)
symbols-view, v0.113.1 (inactive)
tabs, v0.103.1 (active)
timecop, v0.33.2 (active)
tree-view, v0.211.1 (active)
update-package-dependencies, v0.10.0 (active)
welcome, v0.35.1 (active)
whitespace, v0.35.0 (active)
wrap-guide, v0.39.0 (active)
language-c, v0.54.0 (active)
language-clojure, v0.22.1 (active)
language-coffee-script, v0.48.1 (active)
language-csharp, v0.13.0 (active)
language-css, v0.40.1 (active)
language-gfm, v0.88.0 (active)
language-git, v0.15.0 (active)
language-go, v0.43.0 (active)
language-html, v0.47.1 (active)
language-hyperlink, v0.16.1 (active)
language-java, v0.24.0 (active)
language-javascript, v0.122.0 (active)
language-json, v0.18.3 (active)
language-less, v0.29.6 (active)
language-make, v0.22.2 (active)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (active)
language-perl, v0.37.0 (active)
language-php, v0.37.3 (active)
language-property-list, v0.8.0 (active)
language-python, v0.45.1 (active)
language-ruby, v0.70.2 (active)
language-ruby-on-rails, v0.25.1 (active)
language-sass, v0.57.0 (active)
language-shellscript, v0.23.0 (active)
language-source, v0.9.0 (active)
language-sql, v0.25.0 (active)
language-text, v0.7.1 (active)
language-todo, v0.29.1 (active)
language-toml, v0.18.1 (active)
language-xml, v0.34.12 (active)
language-yaml, v0.27.1 (active)

# Dev
No dev packages
t9md commented 7 years ago

Thanks for reporting, confirmed.