title: NSLayoutManager behavior?
body: <p>I have an NSLayoutManager, two NSTextContainers, and an NSTextStorage object.</p>
  
  <p>I add strings one by one to the textStorage object until the first textContainer is full, then I use the amount of text added to that textContainer draw a page in my book app. </p>
  
  <p>99% of the time the isAtEnd flag in didCompleteLayoutForTextContainer will tell me when the first text container got full.</p>
  
  <p>However, in a rare case, if I add a string to the textStorage it will actually remove text from the first text container! </p>
  
  <p>For example, when the first text container has this string in it (and is almost full): </p>
  
  <pre><code> \n\n\n\n\n\nMexico  \n\nBook Covers from Germany  \n\n \n\n \n\n Book Covers from Germany Special Edition  \n\nBook Covers from Denmark  Sweden \n\nBook Covers from Japan \n\nBook Covers From Finland  \n\nBook Covers From Greece
  </code></pre>
  
  <p>if I add this string to the textStorage: </p>
  
  <pre><code>Spain  \n\nBook Covers From Iceland  \n\nBook Covers From Netherlands  \n\nBook Covers from Norway
  </code></pre>
  
  <p>the layoutManager will move the word "Greece" from the first textContainer and move it to the second textContainer. </p>
  
  <p>I would have rather had the layoutManager tell me that the first textContainer was full before I attempted to add a new string and have it do this unexpected behavior. </p>
  
  <p>Can anyone tell me why this is happening? or tell me how I can tell when this will happen again so that I can figure out when the first textContainer is really full? </p>
  
  <p>Thanks!</p>