]> git.lyx.org Git - features.git/blobdiff - src/BufferParams.cpp
Fix bug #9854 "Dataloss after git merge with change tracking"
[features.git] / src / BufferParams.cpp
index 3af14272dbbf18673fe582d2366a0012e2bab2c5..029e5b524c27cbb1c2c900b99c57f76b5e7f8f64 100644 (file)
@@ -429,6 +429,9 @@ BufferParams::BufferParams()
 
        output_sync = false;
        use_refstyle = true;
+
+       // map current author
+       author_map_[pimpl_->authorlist.get(0).bufferId()] = 0;
 }
 
 
@@ -504,6 +507,12 @@ AuthorList const & BufferParams::authors() const
 }
 
 
+void BufferParams::addAuthor(Author a)
+{
+       author_map_[a.bufferId()] = pimpl_->authorlist.record(a);
+}
+
+
 BranchList & BufferParams::branchlist()
 {
        return pimpl_->branchlist;
@@ -876,7 +885,7 @@ string BufferParams::readToken(Lexer & lex, string const & token,
                istringstream ss(lex.getString());
                Author a;
                ss >> a;
-               author_map[a.bufferId()] = pimpl_->authorlist.record(a);
+               addAuthor(a);
        } else if (token == "\\paperorientation") {
                string orient;
                lex >> orient;