- fix: Backspace still works in readonly mode

This commit is contained in:
royqh1979@gmail.com 2021-10-19 09:05:11 +08:00
parent 21083cbb6a
commit cd91df6fb8
3 changed files with 7 additions and 6 deletions

View File

@ -1,9 +1,11 @@
Version 0.7.0
- fix: Backspace still works in readonly mode
Version 0.6.8 Version 0.6.8
- enhancement: add link to cppreference in the help menu - enhancement: add link to cppreference in the help menu
- fix: add mutex lock to prevent editor crash in rare conditions - fix: add mutex lock to prevent editor crash in rare conditions
- fix: In the create project dialog, the browser button doesn't work - fix: In the create project dialog, the browser button doesn't work
- enhancement: use QStyle to implement the dark style, and better control of the style's look and feel - enhancement: use QStyle to implement the dark style, and better control of the style's look and feel
- enhancement: add link to C/C++ reference website in the help menu
- enhancement: add link to EGE website, if locale is zh_CN - enhancement: add link to EGE website, if locale is zh_CN
Version 0.6.7 Version 0.6.7

View File

@ -1522,22 +1522,21 @@ void SynEdit::doToggleComment()
void SynEdit::doDeleteLastChar() void SynEdit::doDeleteLastChar()
{ {
// if not ReadOnly then begin if (mReadOnly)
return ;
doOnPaintTransientEx(SynTransientType::ttBefore, true); doOnPaintTransientEx(SynTransientType::ttBefore, true);
auto action = finally([this]{ auto action = finally([this]{
ensureCursorPosVisible(); ensureCursorPosVisible();
doOnPaintTransientEx(SynTransientType::ttAfter, true); doOnPaintTransientEx(SynTransientType::ttAfter, true);
}); });
// try
if (selAvail()) { if (selAvail()) {
setSelectedTextEmpty(); setSelectedTextEmpty();
return; return;
} }
QString Temp = lineText(); QString Temp = lineText();
//TabBuffer := Lines.ExpandedStrings[CaretY - 1];
int Len = Temp.length(); int Len = Temp.length();
BufferCoord Caret = caretXY(); BufferCoord Caret = caretXY();
// int vTabTrim = 0;
QString helper = ""; QString helper = "";
if (mCaretX > Len + 1) { if (mCaretX > Len + 1) {
// if (mOptions.setFlag(eoSmartTabDelete)) { // if (mOptions.setFlag(eoSmartTabDelete)) {

View File

@ -3,7 +3,7 @@
#include <QStringList> #include <QStringList>
#define DEVCPP_VERSION "0.6.8" #define DEVCPP_VERSION "0.6.9"
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
#define APP_SETTSINGS_FILENAME "redpandacpp.ini" #define APP_SETTSINGS_FILENAME "redpandacpp.ini"