def get_window_text(
        self, *, line_numbers: bool = False, status_line: bool = False, pre_post_line: bool = False
    ) -> str:
        """Get the text in the current display window with optional status/extra information

        Args:
            line_numbers: include line numbers in the output
            status_line: include the status line in the output (file path, total lines)
            pre_post_line: include the pre/post line in the output (number of lines above/below)
        """
        start_line, end_line = self.line_range
        lines = self.text.split("\n")[start_line : end_line + 1]
        out_lines = []
        if status_line:
            out_lines.append(f"[File: {self.path} ({self.n_lines} lines total)]")
        if pre_post_line:
            if start_line > 0:
                out_lines.append(f"({start_line} more lines above)")
        if line_numbers:
            out_lines.extend(f"{i + start_line + 1}:{line}" for i, line in enumerate(lines))
        else:
            out_lines.extend(lines)
        if pre_post_line:
            if end_line < self.n_lines - 1:
                out_lines.append(f"({self.n_lines - end_line - 1} more lines below)")
        return "\n".join(out_lines)
Get the text in the current display window with optional status/extra information

        Args:
            line_numbers: include line numbers in the output
            status_line: include the status line in the output (file path, total lines)
            pre_post_line: include the pre/post line in the output (number of lines above/below)
        
tools/windowed/lib/windowed_file.py