def append(index, str)
      check_index(index)
      window = @session.request(:nvim_get_current_win)
      cursor = window.cursor

      set_lines(index, index, true, [*str.split($/)])
      window.set_cursor(cursor)
      str
    end
def append(index, str)
      check_index(index)
      window = @session.request(:nvim_get_current_win)
      cursor = window.cursor

      set_lines(index, index, true, [*str.split($/)])
      window.set_cursor(cursor)
      str
    end
Append a line after the given line (1-indexed).

 To maintain backwards compatibility with +vim+, the cursor is forced back
 to its previous position after inserting the line.

 @param index [Integer]
 @param str [String]
 @return [String]