title: NSTextView no cursor if it's empty
body: <p>Working with series of NSTextView, connected with a single NSLayoutManager. Very common configuration. Every time user hits Enter, new NSTextView created. In other words, every paragraph is in its own NSTextView instance.</p>
  
  <p>But it's been days I'm struggling with this issue: if last NSTextView in chain is empty (say, user just hit Enter and moved cursor back somewhere in previous text view), then the cursor disappears when come back in this empty NSTextView. If I click by mouse, I have to click twice in the empty text view, so the cursor appears. If I move the cursor with arrow keys, then, again, I have to press an arrow key twice.</p>
  
  <p>I've tried update cursor, but nothing happens. This issue is happens if text view is empty and the last one in series. Where should I find the answer? Searched this forum, Apple docs, googled it — nothing.</p>
  
  <p>create first text view</p>
  
  <pre><code>let textContainer = NSTextContainer(containerSize: containerSize)
  layoutManager.addTextContainer(textContainer)
  let textView = NSTextView(frame: frame, textContainer: textContainer)       
  someView.addSubview(textView)
  </code></pre>
  
  <p>create second text view</p>
  
  <pre><code>let anotherTextContainer = NSTextContainer(containerSize: containerSize)
  layoutManager.addTextContainer(anotherTextContainer)
  let anotherTextView = NSTextView(frame: anotherFrame, textContainer: anotherTextContainer)
  someView.addSubview(anotherTextView)
  </code></pre>
  
  <p>Now run, type something and hit Enter. Now, if you move the cursor up and then back down, it won't show up. You have to press down key again, then the cursor will show up. Same with mouse: you'll have to do left click for two times and only after that the cursor will show up in the second text view.</p>
  
  <p>Here's the example: <a href="https://www.dropbox.com/s/47domcy0nuisncc/%D0%A1%D0%BA%D1%80%D0%B8%D0%BD%D1%88%D0%BE%D1%82%202014-06-28%2013.37.58.png" rel="nofollow">https://www.dropbox.com/s/47domcy0nuisncc/%D0%A1%D0%BA%D1%80%D0%B8%D0%BD%D1%88%D0%BE%D1%82%202014-06-28%2013.37.58.png</a></p>
  
  <p>Here's a sample project: <a href="https://www.dropbox.com/s/aw01oo0faajr4rn/Test.zip" rel="nofollow">https://www.dropbox.com/s/aw01oo0faajr4rn/Test.zip</a>. I made it from scratch, when you hit Enter key, it places a second text view and you can see, that issue occurs even in a new clean projects.</p>