ex-mode icon indicating copy to clipboard operation
ex-mode copied to clipboard

Uncaught TypeError: Cannot read property 'slice' of null

Open dynofu opened this issue 5 years ago • 6 comments

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.29.0 x64 Electron: 2.0.5 OS: Mac OS X 10.13.6 Thrown From: ex-mode package 0.18.0

Stack Trace

Uncaught TypeError: Cannot read property 'slice' of null

At /Users/dynofu/.atom/packages/ex-mode/lib/ex-state.coffee:59

TypeError: Cannot read property 'slice' of null
    at /packages/ex-mode/lib/ex.coffee:382:41
    at TextBuffer.module.exports.TextBuffer.scanInRange (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:1118:15)
    at TextEditor.scanInBufferRange (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:3545:73)
    at /packages/ex-mode/lib/ex.coffee:378:16
    at TextBuffer.module.exports.TextBuffer.transact (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:973:24)
    at TextEditor.transact (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:2002:30)
    at Ex.substitute (/packages/ex-mode/lib/ex.coffee:376:12)
    at Ex.s (/packages/ex-mode/lib/ex.coffee:385:17)
    at /packages/ex-mode/lib/ex.coffee:1:1
    at Command.execute (/packages/ex-mode/lib/command.coffee:195:11)
    at ExState.processOpStack (/packages/ex-mode/lib/ex-state.coffee:53:17)
    at ExState.pushOperations (/packages/ex-mode/lib/ex-state.coffee:43:6)
    at ExViewModel.ViewModel.confirm (/packages/ex-mode/lib/view-model.coffee:13:14)
    at ExViewModel.module.exports.ExViewModel.confirm (/packages/ex-mode/lib/ex-view-model.coffee:56:5)
    at ExViewModel.confirm (/packages/ex-mode/lib/ex-view-model.coffee:1:1)
    at HTMLDivElement.ExCommandModeInputElement.confirm (/packages/ex-mode/lib/ex-normal-mode-input-element.coffee:53:16)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:384:49)
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:621:22)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:412:28)
    at WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:110:40)

Commands

     -0:37.6.0 vim-mode-plus:activate-characterwise-visual-mode (input.hidden-input)
 14x -0:37.5.0 vim-mode-plus:move-down (input.hidden-input)
     -0:35.3.0 vim-mode-plus:move-up (input.hidden-input)
     -0:34.9.0 vim-mode-plus:move-down (input.hidden-input)
     -0:32.8.0 ex-mode:open (input.hidden-input)
     -0:31.6.0 core:move-up (input.hidden-input)
  2x -0:28.6.0 core:backspace (input.hidden-input)
  7x -0:21.6.0 core:move-left (input.hidden-input)
  5x -0:19.5.0 core:move-right (input.hidden-input)
     -0:10.2.0 core:confirm (input.hidden-input)
  3x -0:00.2.0 blur (input.hidden-input)

Non-Core Packages

atom-beautify 0.32.5 
atom-clock 0.1.16 
atom-ide-ui 0.13.0 
atom-material-syntax 1.0.8 
atom-material-syntax-light 0.4.6 
atom-material-ui 2.1.3 
build 0.70.0 
busy 0.7.0 
busy-signal 1.4.3 
cson 2.0.1 
delete-lines 0.5.0 
document-outline 2.1.2 
editorconfig 2.2.2 
ex-mode 0.18.0 
file-icons 2.1.22 
gruvbox-plus-syntax 1.3.1 
hard-wrap 1.7.1 
Hydrogen 2.5.1 
ide-go 0.12.2 
ide-html 0.4.2 
ide-json 0.2.1 
ide-python 1.0.0 
ide-scala 0.7.0 
ide-yaml 0.4.3 
intentions 1.1.5 
language-cassandra-cql 0.1.2 
language-docker 1.1.8 
language-gradle 0.0.5 
language-groovy 0.7.0 
language-hql 4.1.0 
language-ini 1.20.0 
language-matlab 0.2.1 
language-pcf 0.2.0 
language-protobuf 0.7.1 
language-restructuredtext 1.1.2 
language-scala 1.1.9 
language-verilog 0.4.0 
language-viml 1.1.8 
linter 2.2.0 
linter-flake8 2.3.0 
linter-ui-default 1.7.1 
linter-verilog 0.7.0 
markdown-writer 2.8.0 
merge-conflicts 1.4.5 
monokai 0.24.0 
nuclide 0.333.0 
pinned-tabs 2.0.6 
platformio-ide-terminal 2.8.3 
python-debugger 0.2.0 
python-tools 0.6.9 
scala-format 0.1.8 
script 3.18.1 
seti-syntax 1.2.0 
seti-ui 1.11.0 
sort-lines 0.18.0 
structure-view 0.2.1 
symbols-tree-nav 0.15.5 
sync-settings 0.8.6 
table-editor 0.2.2 
teletype 0.13.3 
tool-bar 1.1.7 
unity-ui 2.1.11 
vim-mode-plus 1.34.0 

dynofu avatar Aug 09 '18 18:08 dynofu

i was trying to split a stacktrace with '<,'>s/at /\nat /g

dynofu avatar Aug 09 '18 18:08 dynofu

I am getting this error too

keith-ferney avatar Sep 05 '18 20:09 keith-ferney

Also had this error. Was trying to change a line with comma's to multiple lines.

.s/,//n/g

ethion21 avatar Oct 10 '18 20:10 ethion21

I have the same error when I did this :%s/;/\n/g

nkamatam avatar Jan 31 '19 09:01 nkamatam

New line issue here too, specifically :s/\t/\n/g

Befall avatar Mar 04 '19 20:03 Befall

It seems that this issue comes up almost with any escape character sequence. I've had it when searching for \\Q then trying to replace :s/// for instance.

dionyziz avatar Feb 16 '20 06:02 dionyziz