diff --git a/NEWS.md b/NEWS.md index 28bf5893..16bd238e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -20,6 +20,8 @@ Version 0.6.0 - enhancement: support #include_next (and clang libc++) - fix: hide popup windows when the editor is closed - enhancement: show pinyin when input chinese characters + - fix: add mutex lock to prevent rare conditions when editor is modifying and the content is read + - fix: makefile generated for static / dynamic library projects not right Version 0.5.0 - enhancement: support C++ using type alias; diff --git a/RedPandaIDE/compiler/projectcompiler.cpp b/RedPandaIDE/compiler/projectcompiler.cpp index 8154f030..a68400a2 100644 --- a/RedPandaIDE/compiler/projectcompiler.cpp +++ b/RedPandaIDE/compiler/projectcompiler.cpp @@ -49,7 +49,7 @@ void ProjectCompiler::createStaticMakeFile() { QFile file(mProject->makeFileName()); newMakeFile(file); - file.write("$(BIN): $(LINKOBJ)"); + writeln(file,"$(BIN): $(LINKOBJ)"); if (!mOnlyCheckSyntax) { writeln(file,"\tar r $(BIN) $(LINKOBJ)"); writeln(file,"\tranlib $(BIN)"); @@ -61,7 +61,7 @@ void ProjectCompiler::createDynamicMakeFile() { QFile file(mProject->makeFileName()); newMakeFile(file); - file.write("$(BIN): $(LINKOBJ)"); + writeln(file,"$(BIN): $(LINKOBJ)"); if (!mOnlyCheckSyntax) { if (mProject->options().useGPP) { file.write("\t$(CPP) -mdll $(LINKOBJ) -o $(BIN) $(LIBS) -Wl,--output-def,$(DEF),--out-implib,$(STATIC)"); diff --git a/RedPandaIDE/editor.cpp b/RedPandaIDE/editor.cpp index 659b0ba8..c5df1943 100644 --- a/RedPandaIDE/editor.cpp +++ b/RedPandaIDE/editor.cpp @@ -762,8 +762,8 @@ void Editor::onGetEditingAreas(int Line, SynEditingAreaList &areaList) p->type = SynEditingAreaType::eatRectangleBorder; // int spaceCount = leftSpaces(mLineBeforeTabStop); // int spaceBefore = mLineBeforeTabStop.length()-TrimLeft(mLineBeforeTabStop).length(); - p->beginX = charToColumn(Line,mTabStopBegin); - p->endX = charToColumn(Line,mTabStopEnd) ; + p->beginX = mTabStopBegin; + p->endX = mTabStopEnd; p->color = highlighter()->stringAttribute()->foreground(); areaList.append(p); } diff --git a/RedPandaIDE/qsynedit/TextPainter.cpp b/RedPandaIDE/qsynedit/TextPainter.cpp index 7ae3256c..919d29fa 100644 --- a/RedPandaIDE/qsynedit/TextPainter.cpp +++ b/RedPandaIDE/qsynedit/TextPainter.cpp @@ -971,7 +971,7 @@ void SynEditTextPainter::PaintLines() //Paint editingAreaBorders foreach (const PSynEditingArea& area, areaList) { if (bCurrentLine && edit->mInputPreeditString.length()>0) { - if (area->beginX >= edit->mCaretX) { + if (area->beginX > edit->mCaretX) { area->beginX+=edit->mInputPreeditString.length(); } if (area->endX > edit->mCaretX) {