Double the single quote.

Добавлена команда удвоения одиночной кавычки в выделеном тексте и обратная команда.
This commit is contained in:
lsv 2023-01-12 14:31:08 +05:00
parent 2bb2ff25cf
commit 614a7f0adc
6 changed files with 40 additions and 0 deletions

View file

@ -787,7 +787,27 @@ void ctlSQLBox::OnKeyDown(wxKeyEvent &event)
else
event.Skip();
}
bool ctlSQLBox::BlockDouble(bool undouble)
{
int start = GetSelectionStart();
if (!GetSelectedText().IsEmpty())
{
wxString selection = GetSelectedText();
if (!undouble)
{
selection.Replace("'", "''");
}
else
{
selection.Replace("''", "'");
}
ReplaceSelection(selection);
SetSelection(start, start + selection.Length());
}
return true;
}
bool ctlSQLBox::BlockComment(bool uncomment)
{
wxString lineEnd;