From: <k_s...@us...> - 2012-03-06 18:12:55
|
Revision: 21254 http://jedit.svn.sourceforge.net/jedit/?rev=21254&view=rev Author: k_satoda Date: 2012-03-06 18:12:46 +0000 (Tue, 06 Mar 2012) Log Message: ----------- Fixed invalid access from inactive DisplayManager to information for an unrelated active buffer (wrap mode, ChunkCache, etc) set in the corresponding TextArea. (SF.net bug #3442116) This change should be commited in r21253 all together. The separation was my mistake. Revision Links: -------------- http://jedit.svn.sourceforge.net/jedit/?rev=21253&view=rev Modified Paths: -------------- jEdit/trunk/org/gjt/sp/jedit/textarea/DisplayManager.java Modified: jEdit/trunk/org/gjt/sp/jedit/textarea/DisplayManager.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/textarea/DisplayManager.java 2012-03-06 17:59:18 UTC (rev 21253) +++ jEdit/trunk/org/gjt/sp/jedit/textarea/DisplayManager.java 2012-03-06 18:12:46 UTC (rev 21254) @@ -482,8 +482,12 @@ if(!initialized) { - bufferHandler.foldHandlerChanged(buffer); - notifyScreenLineChanges(); + folds.reset(buffer.getLineCount()); + resetAnchors(); + int collapseFolds = buffer.getIntegerProperty( + "collapseFolds",0); + if(collapseFolds != 0) + expandFolds(collapseFolds); initialized = true; } else @@ -675,13 +679,17 @@ // bufferLoaded(). return; + initialized = false; folds.reset(buffer.getLineCount()); - resetAnchors(); - - int collapseFolds = buffer.getIntegerProperty( - "collapseFolds",0); - if(collapseFolds != 0) - expandFolds(collapseFolds); + if(textArea.getDisplayManager() == this) + { + init(); + } + else + { + // init() will be called later when the buffer + // is set in the textArea. + } } //}}} //}}} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |