gangstead / atom-incremental-search

Incremental search for the Atom editor
MIT License
16 stars 13 forks source link

Uncaught Error: This TextEditor has been destroyed #27

Closed billbonney closed 9 years ago

billbonney commented 9 years ago

[Enter steps to reproduce below:]

  1. Press CTRL-I a couple of time with no selection

It does seem somewhat erratic on Atom using Xbuntu 14.10. Hope this helps :)

Atom Version: 0.187.0 System: linux 3.16.0-31-generic Thrown From: incremental-search package, v4.2.0

Stack Trace

Uncaught Error: This TextEditor has been destroyed

At /usr/share/atom/resources/app/src/display-buffer.js:1005

Error: This TextEditor has been destroyed
  at DisplayBuffer.module.exports.DisplayBuffer.screenPositionForBufferPosition (/usr/share/atom/resources/app/src/display-buffer.js:1005:15)
  at DisplayBuffer.module.exports.DisplayBuffer.screenRangeForBufferRange (/usr/share/atom/resources/app/src/display-buffer.js:870:20)
  at Marker.module.exports.Marker.getScreenRange (/usr/share/atom/resources/app/src/marker.js:173:33)
  at SearchModel.module.exports.SearchModel.moveToClosestResult (/home/bonney/.atom/packages/incremental-search/lib/search-model.coffee:217:55)
  at SearchModel.module.exports.SearchModel.findNext (/home/bonney/.atom/packages/incremental-search/lib/search-model.coffee:205:6)
  at InputView.module.exports.InputView.trigger (/home/bonney/.atom/packages/incremental-search/lib/input-view.coffee:117:20)
  at Object.module.exports.findPressed (/home/bonney/.atom/packages/incremental-search/lib/isearch.coffee:35:16)
  at atom-workspace.<anonymous> (/home/bonney/.atom/packages/incremental-search/lib/isearch.coffee:14:90)
  at atom-workspace.handler (/usr/share/atom/resources/app/src/space-pen-extensions.js:115:32)
  at atom-workspace.jQuery.event.dispatch (/usr/share/atom/resources/app/node_modules/space-pen/vendor/jquery.js:4681:9)
  at atom-workspace.elemData.handle (/usr/share/atom/resources/app/node_modules/space-pen/vendor/jquery.js:4359:46)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app/src/command-registry.js:246: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:182:20)

Commands

     -3:41.1 find-and-replace:show (atom-text-editor.editor)
     -3:38.7 core:confirm (atom-text-editor.editor.mini)
     -3:29.7 incremental-search:forward (atom-text-editor.editor)
     -3:28.3 find-and-replace:show (atom-text-editor.editor.mini.is-focused)
     -1:48.3 editor:newline (atom-text-editor.editor)
     -1:44.9 core:backspace (atom-text-editor.editor)
     -1:22.8 core:copy (atom-text-editor.editor)
     -1:20.2 core:paste (atom-text-editor.editor)
  2x -0:29.8 find-and-replace:show (atom-text-editor.editor)
     -0:15.2 project-find:toggle (div.isearch.tool-panel.panel-bottom.padded)
  2x -0:01.3 incremental-search:forward (atom-text-editor.editor)

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "atom-dark-syntax"
    ]
  }
}

Installed Packages

# User
incremental-search, v4.2.0

# Dev
No dev packages
vaevictis commented 9 years ago

Got the same thing. What happens to me is that the documented behaviour of "enter" key was reversed. Pressing "enter" would cycle through found results, without getting out of the incremental search. Pressing "cmd+enter" would actually send me back to the text editor wherever incremental search was highlighting.

gangstead commented 9 years ago

I just inherited the project and bulk closed all the open issues. Allow me to explain my reasoning:

The package has been losing functionality as it stagnates while Atom marches forward. I've been making changes to remove the deprecations before the API 1.0 cutoff on 6/1/15 or else the package will be blocked from loading. Some are fixed, but it's not done yet. I suspect fixing all the Atom API issues will resolve most of the issues I just closed (hopefully without introducing new ones!). Your issue might be fixed by then, if not feel free to reopen/create a new one, but please be patient.

With this first round of deprecation fixes v4.4.0 on Atom 0.204.0 I restored basic open search box and searches advance while you type functionality. Past that it is still throwing some exceptions as a lot of the package needs to be overhauled.

Thanks for your interest in the package. Submitting issues is a big help, that's how I got started. I'm doing this as a labor of love in my spare time and would love to have more contributors.

aifreedom commented 8 years ago

I still run into this issue now