ide: per-package setting of tabsize

git-svn-id: svn://ultimatepp.org/upp/trunk@10872 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2017-02-22 11:52:45 +00:00
commit 335d2122af
5 changed files with 27 additions and 14 deletions

View file

@ -164,6 +164,7 @@ void Package::Reset()
bold = italic = false;
ink = Null;
spellcheck_comments = Null;
tabsize = Null;
}
Package::Package()
@ -241,6 +242,9 @@ bool Package::Load(const char *path)
if(p.Id("charset"))
charset = CharsetByNameX(p.ReadString());
else
if(p.Id("tabsize"))
tabsize = minmax(p.ReadInt(), 1, 20);
else
if(p.Id("description")) {
description = p.ReadString();
const char *q = strchr(description, 255);
@ -450,6 +454,8 @@ bool Package::Save(const char *path) const {
}
if(charset > 0)
out << "charset " << AsCString(IdeCharsetName(charset)) << ";\n\n";
if(!IsNull(tabsize))
out << "tabsize " << tabsize << ";\n\n";
if(noblitz)
out << "noblitz;\n\n";
if(nowarnings)