Giter VIP home page Giter VIP logo

Comments (6)

DFreds avatar DFreds commented on August 15, 2024

Hmm, unable to reproduce this on 1.16. This only occurs when you have multiple matches, right?

from code-peek-atom.

DFreds avatar DFreds commented on August 15, 2024

Also, did you make any changes to the code in the code peek panel or in the main editor when you opened it in a new tab?

from code-peek-atom.

ph1p avatar ph1p commented on August 15, 2024

Oh ok. I'm on 1.17-beta5.
I've screen captured it for you ;)
code-peek-bug

from code-peek-atom.

DFreds avatar DFreds commented on August 15, 2024

I see. Thanks for taking the time to make the gif. I'm very confused why your actions.js file opens immediately in a new tab when you peek the function in MenuView.js. That shouldn't happen until you click the blue code icon... So maybe something else is going on.

I still can't reproduce it on 1.16. Unless I can, I'm going to punt on it until 1.17 is officially released. Sorry for the inconvenience,

from code-peek-atom.

TauerOne avatar TauerOne commented on August 15, 2024

I'm on version 1.4.21 and I have the same issue. In my installation, a matching file will open in a new tab as soon as it is selected in the code peek pane, even though I haven't clicked on the blue code icon. If I close the new tab and then click on the green check, save icon or the the blue code icon then I get the "Uncaught Error: Can't save destroyed buffer" error. My original question was just going to be, why does the matching file open in a new tab when I haven't clicked on the blue code icon. I think that is the root of the issue. I wonder if it is an issue with some other package I've installed. I'll try disabling them one at a time and see if that helps.

from code-peek-atom.

TauerOne avatar TauerOne commented on August 15, 2024

If anyone is still following this issue, I've found a hack to get around this issue, mostly. I doubt that this it the "right" way to fix it but works for me and maybe it will shed some light on the subject.

In code-peek.coffee, at the end of the toggleCodePeedOn function I added code to detach the text editor view and close the matching text editor.

toggleCodePeekOn: (matchingTextEditor) ->
@codePeekView.attachTextEditorView(@location)
@panel.show()
@codePeekView.detachTextEditorView()
closeEditor(matchingTextEditor)

`function closeEditor(matchingTextEditor) {
var i = 0;
var j = 0;
var thisItem;
var thisPane;
var allPanes = atom.workspace.getPanes();

for (i=0; i<allPanes.length; i++) {
thisPane = allPanes[i];
for (j=0; j<thisPane.items.length; j++) {
thisItem = thisPane.items[j];
if (thisItem === matchingTextEditor) {
thisPane.destroyItem(thisItem, true)
}
}
}
}`

I used plain JS because I don't know coffescript. :(

I lost the ability to save changes from the codepeek panel but that's alright with me because everything else is working. If I'm going to edit the file I'm going to open the full file (click on the blue code icon) and edit it there.

from code-peek-atom.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.