A++ fixes

git-svn-id: svn://ultimatepp.org/upp/trunk@565 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2008-10-22 22:18:13 +00:00
parent 4026460776
commit ac65745af6
3 changed files with 12 additions and 10 deletions

View file

@ -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++;
}

View file

@ -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 {

View file

@ -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);