improved caret text:changed event
changed stream.getNextLine function