-
Notifications
You must be signed in to change notification settings - Fork 128
Add feature to search through all open panes instead of just active pane #97
Conversation
…f just the active one, a preference to control this, and the ability to invert the current preference with Shift-Enter.
if atom.workspace.getActivePane().activateItemForURI(filePath) | ||
@moveToLine(lineNumber) | ||
else | ||
atom.workspace.open(filePath, searchAllPanes: searchAllPanes ).done => @moveToLine(lineNumber) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this if/else block needed and you can't use this for both cases:
atom.workspace.open(filePath, searchAllPanes: searchAllPanes ).done => @moveToLine(lineNumber)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I swear there was a reason, but it works and tests just fine simplified. Changed.
@tmunro Thanks! I think this looks good, just had a few comments (thanks @mnquintana! 🤘). @nathansobo -- you commented on #34 which this PR will close. Do you have some ⌛ to take a look at this as well? |
Thanks for this, I'm going to merge it and then make a few minor changes on master and will link the commit here so you can see what I tweaked. |
Add feature to search through all open panes instead of just active pane
Here were the tweaks I made, really minor stuff: b44656b Typically in packages and core we try to pass around options objects instead of boolean parameters so they are easier to understand when reading lines calling those methods such as: @openPath(filePath, false) versus: @openPath(filePath, searchAllPanes: false) |
Good to know! Happy to help in my own small way, thanks for merging and making those changes. |
I also tweaked the |
Fixes #34: Add feature to search through all open panes instead of just the active one, a preference to control this, and the ability to invert the current preference with Shift-Enter.
@izuzak Sorry about creating a second PR, I got confused about how to rebase and screwed up the other branch.