Skip to content

When calling grepWin, pass target directory on command line instead o…#5857

Open
lhmouse wants to merge 1 commit into
rizonesoft:masterfrom
lhmouse:master
Open

When calling grepWin, pass target directory on command line instead o…#5857
lhmouse wants to merge 1 commit into
rizonesoft:masterfrom
lhmouse:master

Conversation

@lhmouse
Copy link
Copy Markdown
Contributor

@lhmouse lhmouse commented May 13, 2026

…f via INI

In single-instance mode, if there's another instance of grepWin, the new process does not read searchpath from the INI; it always forwards whatever from the command line to the running instance.

Since Notepad3 did not pass /searchpath:, the running grepWin received the working directory of the new process.

The path is now passed via the /searchpath: option, and is not written to grepwin.ini any more.

…f via INI

In single-instance mode, if there's another instance of grepWin, the new process
does not read `searchpath` from the INI; it always forwards whatever from the
command line to the running instance.

Since Notepad3 did not pass `/searchpath:`, the running grepWin received the
working directory of the new process.

The path is now passed via the `/searchpath:` option, and is not written to
`grepwin.ini` any more.
Copilot AI review requested due to automatic review settings May 13, 2026 11:54
@lhmouse
Copy link
Copy Markdown
Contributor Author

lhmouse commented May 13, 2026

There's another bug in grepWin3: stefankueng/grepWin#596

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Notepad3’s grepWin integration so the target search directory is passed directly on grepWin’s command line (/searchpath:) rather than being written into grepwin.ini, addressing single-instance grepWin behavior where INI-provided searchpath is ignored for subsequent invocations.

Changes:

  • Stop writing searchpath into grepwin.ini during DialogGrepWin().
  • Compute the intended search directory (current file’s folder or working directory) and pass it via /searchpath:"..." in the grepWin invocation.

Comment thread src/Dialogs.c
@lhmouse
Copy link
Copy Markdown
Contributor Author

lhmouse commented May 13, 2026

The CI log says 'ERROR: Notepad3's About Box can not be closed!'

@hpwamr hpwamr requested a review from RaiKoHoff May 13, 2026 13:09
@hpwamr
Copy link
Copy Markdown
Collaborator

hpwamr commented May 13, 2026

Hi @RaiKoHoff ,
Could you, please, review this PR #5858? 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants