Fix find 2 occurrences in original/clonned doccuments issue
Fix for Find-All-in-All-Opened-Documents searching a cloned document two times, and reporting same results two times. Fix #6704, close #6705
This commit is contained in:
parent
ab46fe0806
commit
e102ecb919
|
@ -1802,6 +1802,10 @@ bool Notepad_plus::findInOpenedFiles()
|
||||||
for (size_t i = 0, len2 = _subDocTab.nbItem(); i < len2 ; ++i)
|
for (size_t i = 0, len2 = _subDocTab.nbItem(); i < len2 ; ++i)
|
||||||
{
|
{
|
||||||
pBuf = MainFileManager.getBufferByID(_subDocTab.getBufferByIndex(i));
|
pBuf = MainFileManager.getBufferByID(_subDocTab.getBufferByIndex(i));
|
||||||
|
if (_mainDocTab.getIndexByBuffer(pBuf) != -1)
|
||||||
|
{
|
||||||
|
continue; // clone was already searched in main; skip re-searching in sub
|
||||||
|
}
|
||||||
_invisibleEditView.execute(SCI_SETDOCPOINTER, 0, pBuf->getDocument());
|
_invisibleEditView.execute(SCI_SETDOCPOINTER, 0, pBuf->getDocument());
|
||||||
auto cp = _invisibleEditView.execute(SCI_GETCODEPAGE);
|
auto cp = _invisibleEditView.execute(SCI_GETCODEPAGE);
|
||||||
_invisibleEditView.execute(SCI_SETCODEPAGE, pBuf->getUnicodeMode() == uni8Bit ? cp : SC_CP_UTF8);
|
_invisibleEditView.execute(SCI_SETCODEPAGE, pBuf->getUnicodeMode() == uni8Bit ? cp : SC_CP_UTF8);
|
||||||
|
|
Loading…
Reference in New Issue