Skip to content

Commit

Permalink
adjust copying column accordingly
Browse files Browse the repository at this point in the history
  • Loading branch information
lifenjoiner committed Feb 29, 2024
1 parent 74ee6b1 commit 61a216e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/SearchDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2295,7 +2295,10 @@ void CSearchDlg::ShowContextMenu(HWND hWnd, int x, int y)
case 1: // line number
copyText += std::to_wstring(pInfo->matchLinesNumbers[subIndex]);
break;
case 2: // line
case 2: // column number
copyText += std::to_wstring(pInfo->matchColumnsNumbers[subIndex]);
break;
case 3: // line
{
std::wstring line;
if (pInfo->matchLines.size() > static_cast<size_t>(subIndex))
Expand All @@ -2307,7 +2310,7 @@ void CSearchDlg::ShowContextMenu(HWND hWnd, int x, int y)
copyText += line;
}
break;
case 3: // path
case 4: // path
copyText += pInfo->filePath.substr(0, pInfo->filePath.size() - pInfo->filePath.substr(pInfo->filePath.find_last_of('\\') + 1).size() - 1);
break;
}
Expand Down Expand Up @@ -2976,7 +2979,7 @@ void CSearchDlg::DoListNotify(LPNMITEMACTIVATE lpNMItemActivate)
case 1: // line number
swprintf_s(pItem->pszText, pItem->cchTextMax, L"%ld", pInfo->matchLinesNumbers[subIndex]);
break;
case 2: // move number
case 2: // column number
swprintf_s(pItem->pszText, pItem->cchTextMax, L"%ld", pInfo->matchColumnsNumbers[subIndex]);
break;
case 3: // line
Expand Down

0 comments on commit 61a216e

Please sign in to comment.