diff --git a/uppsrc/CppBase/Pre.cpp b/uppsrc/CppBase/Pre.cpp index 6d8456133..9785598c6 100644 --- a/uppsrc/CppBase/Pre.cpp +++ b/uppsrc/CppBase/Pre.cpp @@ -98,7 +98,8 @@ SrcFile PreProcess(Stream& in) macro << ')'; } // res.text << '#' << AsCString(SSpaces(macro)); - res.text << '#' << AsCString(macro); + if(include) + res.text << '#' << AsCString(macro); } res.preprocessorLinesRemoved++; } diff --git a/uppsrc/Sql/Sqls.h b/uppsrc/Sql/Sqls.h index 243076782..63f98b2bf 100644 --- a/uppsrc/Sql/Sqls.h +++ b/uppsrc/Sql/Sqls.h @@ -223,15 +223,20 @@ public: }; #ifndef NOAPPSQL + struct AppSql : Sql { void operator=(SqlSource& s) { Assign(s); } void Detach() { Sql::Detach(); } AppSql() : Sql(NULLSQL) {} }; + AppSql& AppCursor(); +//$- #define SQL AppCursor() -// Assist++ cheat: -//$ Sql& SQL; +//$+ +// Assist++ cheat: +//$ AppSql SQL; + #endif struct StatementExecutor { diff --git a/uppsrc/ide/idefile.cpp b/uppsrc/ide/idefile.cpp index 65a986cc0..91e4ce585 100644 --- a/uppsrc/ide/idefile.cpp +++ b/uppsrc/ide/idefile.cpp @@ -403,6 +403,8 @@ void Ide::EditFile0(const String& path, byte charset, bool astext, const String& editor.SetLineInfoRem(fd.lineinforem); if(ff.IsReadOnly()) editor.SetReadOnly(); + fd.undodata.Clear(); + PosSync(); } else { RealizePath(editfile); @@ -422,15 +424,9 @@ void Ide::EditFile0(const String& path, byte charset, bool astext, const String& editor.SetCursor(editor.GetPos(1)); } editor.SetCharset(charset); - MakeTitle(); - SetBar(); - editor.CheckEdited(true); - return; } - fd.undodata.Clear(); - MakeTitle(); editor.SetFocus(); - PosSync(); + MakeTitle(); SetBar(); editor.assist_active = IsProjectFile(editfile) && (IsCSourceFile(editfile) || IsCHeaderFile(editfile)); editor.CheckEdited(true);