code: function (cursor) {
              var cs = this.lineCursors;
              for (var i = 0; i < cs.length; i++) {
                  if (cs[i].position > cursor.position) {
                      return i - 1;
                  }
              }
              return i;
          }
docs: line number of this cursor , index from zero
  @param cursor