title: Monaco Editor: Update Cursor position on text inserted
body: <p>I'm adding some text to the Monaco editor using a button outside it (i.e. "hello world") and then I'm trying to set the cursor position to the next line.  </p>
  
  <p>I tried using the "setPosition({column:x, lineNumber:y})" function from the editor, but it doesn't work.</p>
  
  <p>This is how I'm implementing it:</p>
  
  <pre><code>insertInPosition(textToInsert:string, cursorPosition:any){
      this.editorInstance.setPosition(cursorPosition);
      var allInstructions = this.instructionSet.split("\n")
      allInstructions.splice(cursorPosition.lineNumber - 1, 0, textToInsert);
      allInstructions.splice(cursorPosition.lineNumber, 1);
      allInstructions = allInstructions.join("\n");
      this.editorInstance.setPosition(cursorPosition);
  }
  </code></pre>
  
  <p>I expect to see the cursor in the line and column defined by cursorPosition, but I actually see that the cursor points to line 1 and column 1 (At the top of the editor).</p>
  
  <p>I also tried to use the same api <code>editor.setPosition()</code> inside the <code>onDidChangeModelContent()</code> method, but it doesn't works. And when I print in console the <code>editor.getPosition()</code> I receive the correct positions.</p>
  
  <p>Any idea on what could be wrong?</p>