Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Add feature to search through all open panes instead of just active pane #97

Merged
merged 5 commits into from
Apr 30, 2015

Conversation

tmunro
Copy link
Contributor

@tmunro tmunro commented Apr 26, 2015

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.

tmunro added 3 commits April 26, 2015 11:55
…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)
Copy link
Contributor

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)

Copy link
Contributor Author

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.

@izuzak
Copy link
Contributor

izuzak commented Apr 27, 2015

@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?

@kevinsawicki
Copy link
Contributor

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.

kevinsawicki added a commit that referenced this pull request Apr 30, 2015
Add feature to search through all open panes instead of just active pane
@kevinsawicki kevinsawicki merged commit f774ab1 into atom:master Apr 30, 2015
@kevinsawicki
Copy link
Contributor

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)

@tmunro
Copy link
Contributor Author

tmunro commented Apr 30, 2015

Good to know! Happy to help in my own small way, thanks for merging and making those changes.

@kevinsawicki
Copy link
Contributor

I also tweaked the fuzzy-finder:invert-confirm keybinding to only be enabled on the mini editor inside the fuzzy finder view. Previously it was registered globally.

9b856d2

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Choose already opened file even from another pane
5 participants