From e0a5158d37101f60b16be0957c97c35f2d0a0f46 Mon Sep 17 00:00:00 2001 From: John Levon Date: Wed, 12 Mar 2003 02:59:56 +0000 Subject: [PATCH] small tweak git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6456 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 5 +++++ src/buffer.C | 12 +++--------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index c27d2895cb..53303d5d84 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-03-12 John Levon + + * buffer.C: make current_change static local not + static file-scope + 2003-03-12 John Levon * buffer.C: fix insertStringAsLines for change tracking diff --git a/src/buffer.C b/src/buffer.C index de83850766..3e88e2fc65 100644 --- a/src/buffer.C +++ b/src/buffer.C @@ -452,13 +452,6 @@ bool Buffer::readBody(LyXLex & lex, Paragraph * par) } -namespace { - // This stuff is, in the traditional LyX terminology, Super UGLY - // but this code is too b0rken to admit of a better solution yet - Change current_change; -}; - - int Buffer::readToken(LyXLex & lex, Paragraph *& par, Paragraph *& first_par, @@ -467,6 +460,7 @@ Buffer::readToken(LyXLex & lex, Paragraph *& par, LyXFont & font ) { + static Change current_change; int unknown = 0; // The order of the tags tested may seem unnatural, but this @@ -584,7 +578,7 @@ Buffer::readToken(LyXLex & lex, Paragraph *& par, // But insets should read it, it is a part of // the inset isn't it? Lgb. } else if (token == "\\begin_inset") { - readInset(lex, par, pos, font); + readInset(lex, par, pos, font, current_change); } else if (token == "\\family") { lex.next(); font.setLyXFamily(lex.getString()); @@ -861,7 +855,7 @@ void Buffer::insertStringAsLines(Paragraph *& par, pos_type & pos, void Buffer::readInset(LyXLex & lex, Paragraph *& par, - int & pos, LyXFont & font) + int & pos, LyXFont & font, Change current_change) { // consistency check if (lex.getString() != "\\begin_inset") { -- 2.39.5