I have created a new preview-plus package


#1

I have created a new packages(https://atom.io/packages/preview-plus). I have the following issues.
when I create a new split editor and leave it open the tab when closing the atom editor, while reopening I am getting an error saying getScreenPosition for buffer not defined. it goes back to single screen(not split screen any more)

TypeError: Cannot read property 'getScreenPosition' of undefined
  at TextEditor.module.exports.TextEditor.getCursorScreenPosition (c:\Users\Administrator\AppData\Local\atom\app-0.174.0\resources\app\src\text-editor.js:1357:34)
  at TextEditor.module.exports.TextEditor.isFoldedAtCursorRow (c:\Users\Administrator\AppData\Local\atom\app-0.174.0\resources\app\src\text-editor.js:2617:44)
  at BracketMatcherView.module.exports.BracketMatcherView.updateMatch (c:\Users\Administrator\AppData\Local\atom\app-0.174.0\resources\app\node_modules\bracket-matcher\lib\bracket-matcher-view.js:111:23)
  at new BracketMatcherView (c:\Users\Administrator\AppData\Local\atom\app-0.174.0\resources\app\node_modules\bracket-matcher\lib\bracket-matcher-view.js:74:12)
  at c:\Users\Administrator\AppData\Local\atom\app-0.174.0\resources\app\node_modules\bracket-matcher\lib\main.js:27:9
  at c:\Users\Administrator\AppData\Local\atom\app-0.174.0\resources\app\src\workspace.js:279:16
  at c:\Users\Administrator\AppData\Local\atom\app-0.174.0\resources\app\src\workspace.js:336:18
  at Emitter.module.exports.Emitter.emit (c:\Users\Administrator\AppData\Local\atom\app-0.174.0\resources\app\node_modules\event-kit\lib\emitter.js:82:11)
  at PaneContainer.module.exports.PaneContainer.addedPaneItem (c:\Users\Administrator\AppData\Local\atom\app-0.174.0\resources\app\src\pane-container.js:379:27)
  at c:\Users\Administrator\AppData\Local\atom\app-0.174.0\resources\app\src\pane-container.js:366:26
  at Emitter.module.exports.Emitter.emit (c:\Users\Administrator\AppData\Local\atom\app-0.174.0\resources\app\node_modules\event-kit\lib\emitter.js:82:11)
  at Pane.module.exports.Pane.addItem (c:\Users\Administrator\AppData\Local\atom\app-0.174.0\resources\app\src\pane.js:348:20)
  at Pane.module.exports.Pane.activateItem (c:\Users\Administrator\AppData\Local\atom\app-0.174.0\resources\app\src\pane.js:327:14)
  at tabs-tab.<anonymous> (c:\Users\Administrator\AppData\Local\atom\app-0.174.0\resources\app\node_modules\tabs\lib\tab-bar-view.js:184:24)
  at space-pen-ul.jQuery.event.dispatch (c:\Users\Administrator\AppData\Local\atom\app-0.174.0\resources\app\node_modules\archive-view\node_modules\atom-space-pen-views\node_modules\space-pen\vendor\jquery.js:4676:9)
  at space-pen-ul.elemData.handle (c:\Users\Administrator\AppData\Local\atom\app-0.174.0\resources\app\node_modules\archive-view\node_modules\atom-space-pen-views\node_modules\space-pen\vendor\jquery.js:4360:46)

Also the backspace/delete key would not work on the modal panel view in the input box.


#2

I suspect this is the native key bindings thing. It’s mentioned here in the documentation:

https://atom.io/docs/latest/advanced/keymaps#forcing-chromiums-native-keystroke-handling

You can also search the board here for discussions of it to find the full solution, if I’m correct about it.