* fix undo bug

This commit is contained in:
royqh1979@gmail.com 2021-06-06 09:45:08 +08:00
parent 646550cf06
commit 35249d57df
1 changed files with 2 additions and 2 deletions

View File

@ -3342,7 +3342,7 @@ QString SynEdit::selText()
int l = columnToChar(i,ColFrom);
int r = columnToChar(i,ColTo-1);
QString s = mLines->getString(i);
result += s.mid(l-1,r-l+1);
result += s.mid(l-1,r-l);
result+=lineBreak();
}
return result;
@ -3701,7 +3701,7 @@ void SynEdit::DeleteSelection(const BufferCoord &BB, const BufferCoord &BE)
int l = columnToChar(i,ColFrom);
int r = columnToChar(i,ColTo-1);
QString s = mLines->getString(i);
s.remove(l-1,r-l+1);
s.remove(l-1,r-l);
ProperSetLine(i,s);
}
// Lines never get deleted completely, so keep caret at end.