-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[REGRESSION] "Open Selected PathName(s)" command not working #15960
Comments
@alankilborn |
Yes, I will, in the next 24 hours (traveling now). |
@alankilborn |
I can reproduce the problem: I created a scenario where I expected 396 tabs to be opened; I get only 5 opened! Please grant me some additional time to continue looking into this, as my time behind the keyboard is limited at the moment. |
Regarding b822480 If you'll recall, you immediately replaced the code of that commit with some code that "softmgr" supplied; see #15741 (comment) But... I did look into the problem, regardless of who authored it, and on a quick patch basis (still traveling, screen time is limited for thorough testing), I might suggest you try the following replacement for the vector<wstring> Finder::getResultFilePaths(bool onlyInSelectedText) const
{
size_t fromLine = 0, toLine = 0;
if (onlyInSelectedText)
{
const pair<size_t, size_t> lineRange = _scintView.getSelectionLinesRange();
fromLine = lineRange.first;
toLine = lineRange.second;
}
else
{
toLine = _scintView.execute(SCI_GETLINECOUNT) - 1;
}
size_t len = _pMainFoundInfos->size();
vector<wstring> paths;
for (size_t line = fromLine; line <= toLine; ++line)
{
const int lineFoldLevel = _scintView.execute(SCI_GETFOLDLEVEL, line) & SC_FOLDLEVELNUMBERMASK;
if (lineFoldLevel == fileHeaderLevel)
{
// fileHeaderLevel lines don't have path info; have to look into the NEXT line for it,
// but only need to do something special here if we are on the LAST line of the selection
if (line == toLine)
{
++line;
}
}
if (line < len)
{
wstring& path2add = (*_pMainFoundInfos)[line]._fullPath;
if (!path2add.empty())
{
// make sure that path is not already in
if (std::find(paths.begin(), paths.end(), path2add) == paths.end())
{
paths.push_back(path2add);
}
}
}
}
return paths;
} Notes:
|
@alankilborn
No, please keep it as it is - the change of structure could draw a lot of regressions.
|
Let's wait as I want to look further into this:
"while the line is not visible" did not come into play when I was replicating your REGRESSION from this issue -- I was not trying to open files using collapsed text from Search results -- and I could still replicate, so... |
OK, you can always create PR if you have a better solution. |
If the "current solution" has no bug (I hope), then it probably isn't worth seeking that "better solution" now.
Was it an "accusation" or did you just have confidence in me that I would find a fix? :-) |
I have tested it quite a lot - so far so good. So if there's no more bug, I think we will keep it.
I don't blame to you but it's due to the change of behaviour (Open All files -> Open Selected PathNames) from you. |
But change is worth the risk to bring better features, don't you think?
Well then I hope to remain capable. :-) |
Is there an existing issue for this?
Description of the Issue
"Open Selected PathName(s)" command does not open all files while selection all Search results.
Steps To Reproduce
Current Behavior
Less 87 files are opened.
Expected Behavior
All 87 files are opened.
Debug Information
Anything else?
If scroll down the search result to the end then all 87 files can be opened.
The regression could be introduced by:
b8224804671826
The text was updated successfully, but these errors were encountered: