mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-21 21:04:54 +02:00
Prevent redundant line-data copy when using Finder's rclick-Copy
Fix #8580, close #8620
This commit is contained in:
parent
d55350b4b5
commit
5adb75dc89
@ -3462,12 +3462,17 @@ void Finder::copy()
|
||||
}
|
||||
|
||||
std::vector<generic_string> lines;
|
||||
generic_string previousResultLineStr(TEXT(""));
|
||||
for (size_t line = fromLine; line <= toLine; ++line)
|
||||
{
|
||||
generic_string lineStr = _scintView.getLine(line);
|
||||
if (isLineActualSearchResult(lineStr))
|
||||
{
|
||||
lines.push_back(prepareStringForClipboard(lineStr));
|
||||
if (lineStr != previousResultLineStr)
|
||||
{
|
||||
previousResultLineStr = lineStr;
|
||||
lines.push_back(prepareStringForClipboard(lineStr));
|
||||
}
|
||||
}
|
||||
}
|
||||
const generic_string toClipboard = stringJoin(lines, TEXT("\r\n"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user