(self, buffer_contents, start_view, target_view, callback)
Request a pathfinding result from the server.

        :param buffer_contents: List of lines we are pathfinding inside.
        :param start_view: The start position, in the current window.
        :param target_view: The target position, in the current window.
        :param callback: Function to be called once a path is found. Recieves a list
            of motions as a parameter.
Request a pathfinding result from the server.
Request a pathfinding result from the server .
def pathfind(self, buffer_contents, start_view, target_view, callback):
        """
        Request a pathfinding result from the server.

        :param buffer_contents: List of lines we are pathfinding inside.
        :param start_view: The start position, in the current window.
        :param target_view: The target position, in the current window.
        :param callback: Function to be called once a path is found. Recieves a list
            of motions as a parameter.
        """
        self.callback = callback

        min_line, max_line = get_line_limits(start_view, target_view)
        self.to_send = {
            "start": start_view,
            "target": target_view,
            "min_line": min_line,
            "max_line": max_line,
            "size": (
                # WindowTextWidth() - see plugin/dimensions.vim
                vim.eval("WindowTextWidth()"),
                vim.eval("winheight(0)"),
            ),
            "buffer": buffer_contents,
            "wrap": vim.current.window.options["wrap"],
            "scrolloff": vim.options["scrolloff"],
            "sidescrolloff": vim.options["sidescrolloff"],
        }
def pathfind ( self , buffer_contents , start_view , target_view , callback ) : self . callback = callback min_line , max_line = get_line_limits ( start_view , target_view ) self . to_send = { "start" : start_view , "target" : target_view , "min_line" : min_line , "max_line" : max_line , "size" : ( # WindowTextWidth() - see plugin/dimensions.vim vim . eval ( "WindowTextWidth()" ) , vim . eval ( "winheight(0)" ) , ) , "buffer" : buffer_contents , "wrap" : vim . current . window . options [ "wrap" ] , "scrolloff" : vim . options [ "scrolloff" ] , "sidescrolloff" : vim . options [ "sidescrolloff" ] , }