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

open find panel programmatically? #1108

Open
allefeld opened this issue Dec 3, 2019 · 1 comment
Open

open find panel programmatically? #1108

allefeld opened this issue Dec 3, 2019 · 1 comment

Comments

@allefeld
Copy link

allefeld commented Dec 3, 2019

I would like to open the find panel programmatically in my package, for a given TextEditor object, with a given search term and options. Is that possible?

I found TextEditor::scan, but that gives me the search results directly. What I would like to do is initiate the search for the user in the UI, but let them continue / abandon it interactively.

Background: I get error messages from an external program, but without corresponding line numbers, only a part of the offending code.

@gladed
Copy link

gladed commented Mar 12, 2020

This opens Find in Project for text under the cursor:

atom.commands.dispatch(document.querySelector('atom-text-editor'), 'project-find:show')

But I couldn't find a way to pass additional options.

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

No branches or pull requests

1 participant