- fix: errors in the calculation of cut limit
This commit is contained in:
parent
85f3a04bcf
commit
c295649280
1
NEWS.md
1
NEWS.md
|
@ -5,6 +5,7 @@ Red Panda C++ Version 1.0.10
|
|||
- fix: #define followed by tab not correctly parsed
|
||||
- enhancement: don't auto add () when completing C++ io manipulators ( std::endl, std::fixed, etc.)
|
||||
- fix: can't goto to definition of std::endl
|
||||
- fix: errors in the calculation of cut limit
|
||||
|
||||
Red Panda C++ Version 1.0.9
|
||||
- fix: selection in column mode not correctly drawn when has wide chars in it
|
||||
|
|
|
@ -1305,12 +1305,14 @@ void Editor::copyToClipboard()
|
|||
void Editor::cutToClipboard()
|
||||
{
|
||||
if (pSettings->editor().copySizeLimit()) {
|
||||
if (document()->count() > pSettings->editor().copyLineLimits()) {
|
||||
int startLine = blockBegin().Line;
|
||||
int endLine = blockEnd().Line;
|
||||
if ((endLine-startLine+1) > pSettings->editor().copyLineLimits()) {
|
||||
QMessageBox::critical(pMainWindow,tr("Error"),
|
||||
tr("The text to be cut exceeds count limit!"));
|
||||
return;
|
||||
}
|
||||
if (document()->getTextLength() > pSettings->editor().copyCharLimits() * 1000) {
|
||||
if ((selText().length()) > pSettings->editor().copyCharLimits() * 1000) {
|
||||
QMessageBox::critical(pMainWindow,tr("Error"),
|
||||
tr("The text to be cut exceeds character limit!"));
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue