def done_toplevel(self, result):
            self.toplevel_path = result.strip()
            # get file path within repo
            absolute_path = self.view.file_name()
            # self.view.file_name() contains backslash on Windows instead of forwardslash
            absolute_path = absolute_path.replace('\\', '/')
            # we case-insensitive split because Windows
            relative_path = re.split(re.escape(self.toplevel_path), absolute_path, re.IGNORECASE).pop()

            line_nums = ""
            if self.allows_line_highlights:
                # if any lines are selected, the first of those
                non_empty_regions = [region for region in self.view.sel() if not region.empty()]
                if non_empty_regions:
                    selection = non_empty_regions[0]
                    (start_row, _) = self.view.rowcol(selection.begin())
                    (end_row, end_col) = self.view.rowcol(selection.end())
                    # If you select a single line (e.g., by using 'Expand selection to line'),
                    # the selection will actually end up as two lines, ending at column 0 of
                    # the second line. This accounts for that so that the final line is ignored.
                    if end_col == 0:
                        end_row -= 1
                    line_nums = "#L%s" % (start_row + 1)
                    if end_row > start_row:
                        line_nums += "-L%s" % (end_row + 1)
                elif self.settings.get("always_highlight_current_line"):
                    (current_row, _) = self.view.rowcol(self.view.sel()[0].begin())
                    line_nums = "#L%s" % (current_row + 1)

            self.url = "%s/%s/%s%s%s" % (self.repo_url, self.url_type, self.remote_branch, relative_path, line_nums)
            self.on_done()
dataset/ETHPy150Open bgreenlee/sublime-github/sublime_github.py/RemoteUrlCommand.done_toplevel/original