[ENHANCEMENT] (Author: Andreas Jonsson) Enhance the delimiter selection(Ctrl + double click) feature.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1074 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
6264ef03d0
commit
4dd7423f61
|
@ -487,11 +487,23 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
|||
for(unsigned int i = position_of_click; i >= 0; --i)
|
||||
{
|
||||
if(bufstring.at(i) == nppGUI._leftmostDelimiter)
|
||||
{
|
||||
// Respect escaped quotation marks.
|
||||
if(nppGUI._leftmostDelimiter == '"')
|
||||
{
|
||||
if(! (i > 0 && bufstring.at(i - 1) == '\\'))
|
||||
{
|
||||
leftmost_position = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
leftmost_position = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(leftmost_position == -1)
|
||||
break;
|
||||
|
@ -500,11 +512,23 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
|||
for(unsigned int i = position_of_click; i < bufstring.length(); ++i)
|
||||
{
|
||||
if(bufstring.at(i) == nppGUI._rightmostDelimiter)
|
||||
{
|
||||
// Respect escaped quotation marks.
|
||||
if(nppGUI._rightmostDelimiter == '"')
|
||||
{
|
||||
if(! (i > 0 && bufstring.at(i - 1) == '\\'))
|
||||
{
|
||||
rightmost_position = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
rightmost_position = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -904,7 +904,7 @@ BOOL CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lP
|
|||
else
|
||||
{
|
||||
TCHAR moreInfo[128];
|
||||
if(nbCounted <= 1)
|
||||
if (nbCounted == 1)
|
||||
wsprintf(moreInfo, TEXT("Count: %d match."), nbCounted);
|
||||
else
|
||||
wsprintf(moreInfo, TEXT("Count: %d matches."), nbCounted);
|
||||
|
@ -2120,7 +2120,7 @@ void FindReplaceDlg::execSavedCommand(int cmd, int intValue, generic_string stri
|
|||
else
|
||||
{
|
||||
TCHAR moreInfo[128];
|
||||
if (nbCounted <= 1)
|
||||
if (nbCounted == 1)
|
||||
wsprintf(moreInfo, TEXT("Count: %d match."), nbCounted);
|
||||
else
|
||||
wsprintf(moreInfo, TEXT("Count: %d matches."), nbCounted);
|
||||
|
|
Loading…
Reference in New Issue