broot icon indicating copy to clipboard operation
broot copied to clipboard

CRASH: Panic when hitting delete in empty help prompt

Open Zarenor opened this issue 3 years ago • 8 comments

I'm on Windows 11, using Broot in Powershell. If in the help window, with an empty help prompt, I key 'DELETE', I get a slice-index-out-of-range panic. It appears to be trying to erase to the right of the string entered before the help window was opened - for just the ' ?' help verb, the index was 2; the first time I hit it with some other stuff in before the help verb the index was 10.

Let me know if there's more specific detail I can provide.

Zarenor avatar Dec 14 '22 22:12 Zarenor

I don't reproduce that. Can you give me the debug log ?

Canop avatar Dec 15 '22 06:12 Canop

Log contents:

09:12:54.527` [INFO] cli_log::init: Starting broot v1.17.0 with log level DEBUG
09:12:54.528 [DEBUG] broot: env::args(): [
    "C:\\Users\\zijor\\.cargo\\bin\\broot.exe",
]
09:12:54.530 [DEBUG] broot::shell_install: Shell script already installed. Doing nothing.
09:12:54.530 [DEBUG] broot::conf::conf: reading conf file: "C:\\Users\\zijor\\AppData\\Roaming\\dystroy\\broot\\config\\conf.hjson"
09:12:54.532 [DEBUG] broot::conf::conf: reading conf file: "C:\\Users\\zijor\\AppData\\Roaming\\dystroy\\broot\\config\\verbs.hjson"
09:12:54.532 [DEBUG] broot::display::luma: terminal_light::luma() took 6.8µs
09:12:54.532 [INFO] broot::display::luma: terminal's luma: Err(Unsupported)
09:12:54.532 [DEBUG] broot::conf::conf: reading conf file: "C:\\Users\\zijor\\AppData\\Roaming\\dystroy\\broot\\config\\dark-blue-skin.hjson"
09:12:54.534 [DEBUG] broot::conf::conf: skipping not applying conf file : "white-skin.hjson"
09:12:54.534 [DEBUG] broot::cli: Conf::from_default_location() took 3.7737ms
09:12:54.534 [DEBUG] broot::cli: config: Conf {
    files: [
        "C:\\Users\\zijor\\AppData\\Roaming\\dystroy\\broot\\config\\conf.hjson",
        "C:\\Users\\zijor\\AppData\\Roaming\\dystroy\\broot\\config\\verbs.hjson",
        "C:\\Users\\zijor\\AppData\\Roaming\\dystroy\\broot\\config\\dark-blue-skin.hjson",
    ],
    default_flags: None,
    date_time_format: None,
    verbs: [
        VerbConf {
            invocation: Some(
                "edit",
            ),
            internal: None,
            external: None,
            execution: Some(
                String(
                    "$EDITOR +{line} {file}",
                ),
            ),
            cmd: None,
            cmd_separator: None,
            key: None,
            keys: [],
            extensions: [],
            shortcut: Some(
                "e",
            ),
            leave_broot: Some(
                false,
            ),
            from_shell: None,
            apply_to: None,
            set_working_dir: None,
            working_dir: None,
            description: None,
            auto_exec: None,
            panels: [],
        },
        VerbConf {
            invocation: Some(
                "create {subpath}",
            ),
            internal: None,
            external: None,
            execution: Some(
                String(
                    "$EDITOR {directory}/{subpath}",
                ),
            ),
            cmd: None,
            cmd_separator: None,
            key: None,
            keys: [],
            extensions: [],
            shortcut: None,
            leave_broot: Some(
                false,
            ),
            from_shell: None,
            apply_to: None,
            set_working_dir: None,
            working_dir: None,
            description: None,
            auto_exec: None,
            panels: [],
        },
        VerbConf {
            invocation: Some(
                "git_diff",
            ),
            internal: None,
            external: None,
            execution: Some(
                String(
                    "git difftool -y {file}",
                ),
            ),
            cmd: None,
            cmd_separator: None,
            key: None,
            keys: [],
            extensions: [],
            shortcut: Some(
                "gd",
            ),
            leave_broot: Some(
                false,
            ),
            from_shell: None,
            apply_to: None,
            set_working_dir: None,
            working_dir: None,
            description: None,
            auto_exec: None,
            panels: [],
        },
        VerbConf {
            invocation: Some(
                "backup {version}",
            ),
            internal: None,
            external: None,
            execution: Some(
                String(
                    "cp -r {file} {parent}/{file-stem}-{version}{file-dot-extension}",
                ),
            ),
            cmd: None,
            cmd_separator: None,
            key: Some(
                "ctrl-b",
            ),
            keys: [],
            extensions: [],
            shortcut: None,
            leave_broot: Some(
                false,
            ),
            from_shell: None,
            apply_to: None,
            set_working_dir: None,
            working_dir: None,
            description: None,
            auto_exec: Some(
                false,
            ),
            panels: [],
        },
        VerbConf {
            invocation: Some(
                "terminal",
            ),
            internal: None,
            external: None,
            execution: Some(
                String(
                    "$SHELL",
                ),
            ),
            cmd: None,
            cmd_separator: None,
            key: Some(
                "ctrl-t",
            ),
            keys: [],
            extensions: [],
            shortcut: None,
            leave_broot: Some(
                false,
            ),
            from_shell: None,
            apply_to: None,
            set_working_dir: Some(
                true,
            ),
            working_dir: None,
            description: None,
            auto_exec: None,
            panels: [],
        },
    ],
    skin: Some(
        {
            "git_status_conflicted": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                88,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "git_status_other": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                88,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "status_normal": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                252,
                            ),
                        ),
                        background_color: Some(
                            AnsiValue(
                                236,
                            ),
                        ),
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: Some(
                    CompoundStyle {
                        object_style: ContentStyle {
                            foreground_color: Some(
                                AnsiValue(
                                    234,
                                ),
                            ),
                            background_color: Some(
                                AnsiValue(
                                    234,
                                ),
                            ),
                            attributes: Attributes(
                                0,
                            ),
                        },
                    },
                ),
            },
            "directory": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                110,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            4,
                        ),
                    },
                },
                unfocused: Some(
                    CompoundStyle {
                        object_style: ContentStyle {
                            foreground_color: Some(
                                AnsiValue(
                                    110,
                                ),
                            ),
                            background_color: None,
                            attributes: Attributes(
                                0,
                            ),
                        },
                    },
                ),
            },
            "git_status_new": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                94,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            4,
                        ),
                    },
                },
                unfocused: None,
            },
            "preview_line_number": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                244,
                            ),
                        ),
                        background_color: Some(
                            AnsiValue(
                                235,
                            ),
                        ),
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "hex_non_ascii": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                167,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "char_match": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            Green,
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "exe": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            Cyan,
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "group": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                131,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "content_extract": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                29,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "device_id_major": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                138,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "status_job": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                220,
                            ),
                        ),
                        background_color: Some(
                            AnsiValue(
                                237,
                            ),
                        ),
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "scrollbar_track": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                239,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: Some(
                    CompoundStyle {
                        object_style: ContentStyle {
                            foreground_color: Some(
                                AnsiValue(
                                    236,
                                ),
                            ),
                            background_color: None,
                            attributes: Attributes(
                                0,
                            ),
                        },
                    },
                ),
            },
            "git_status_modified": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                28,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "help_paragraph": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                252,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "preview_match": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: None,
                        background_color: Some(
                            AnsiValue(
                                29,
                            ),
                        ),
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "hex_ascii_other": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                215,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "help_italic": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                229,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "count": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                138,
                            ),
                        ),
                        background_color: Some(
                            AnsiValue(
                                236,
                            ),
                        ),
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "git_branch": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                178,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "flag_value": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                178,
                            ),
                        ),
                        background_color: Some(
                            AnsiValue(
                                234,
                            ),
                        ),
                        attributes: Attributes(
                            4,
                        ),
                    },
                },
                unfocused: None,
            },
            "owner": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                138,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "content_match": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                34,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "dates": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                66,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "help_headers": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                178,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "perm_x": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                65,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "flag_label": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                247,
                            ),
                        ),
                        background_color: Some(
                            AnsiValue(
                                234,
                            ),
                        ),
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "input": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                231,
                            ),
                        ),
                        background_color: Some(
                            AnsiValue(
                                234,
                            ),
                        ),
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: Some(
                    CompoundStyle {
                        object_style: ContentStyle {
                            foreground_color: Some(
                                AnsiValue(
                                    247,
                                ),
                            ),
                            background_color: None,
                            attributes: Attributes(
                                0,
                            ),
                        },
                    },
                ),
            },
            "tree": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                240,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: Some(
                    CompoundStyle {
                        object_style: ContentStyle {
                            foreground_color: Some(
                                AnsiValue(
                                    236,
                                ),
                            ),
                            background_color: None,
                            attributes: Attributes(
                                0,
                            ),
                        },
                    },
                ),
            },
            "hex_ascii_graphic": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                250,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "help_bold": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                178,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            4,
                        ),
                    },
                },
                unfocused: None,
            },
            "purpose_ellipsis": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                252,
                            ),
                        ),
                        background_color: Some(
                            AnsiValue(
                                234,
                            ),
                        ),
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "status_code": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                229,
                            ),
                        ),
                        background_color: Some(
                            AnsiValue(
                                236,
                            ),
                        ),
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: Some(
                    CompoundStyle {
                        object_style: ContentStyle {
                            foreground_color: Some(
                                AnsiValue(
                                    234,
                                ),
                            ),
                            background_color: Some(
                                AnsiValue(
                                    234,
                                ),
                            ),
                            attributes: Attributes(
                                0,
                            ),
                        },
                    },
                ),
            },
            "file_error": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            Red,
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "perm_r": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                94,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "parent": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                250,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: Some(
                    CompoundStyle {
                        object_style: ContentStyle {
                            foreground_color: Some(
                                AnsiValue(
                                    245,
                                ),
                            ),
                            background_color: None,
                            attributes: Attributes(
                                0,
                            ),
                        },
                    },
                ),
            },
            "link": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            Magenta,
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "status_error": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                254,
                            ),
                        ),
                        background_color: Some(
                            AnsiValue(
                                124,
                            ),
                        ),
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "git_status_ignored": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                249,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "mode_command_mark": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                237,
                            ),
                        ),
                        background_color: Some(
                            AnsiValue(
                                204,
                            ),
                        ),
                        attributes: Attributes(
                            4,
                        ),
                    },
                },
                unfocused: None,
            },
            "selected_line": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: None,
                        background_color: Some(
                            AnsiValue(
                                238,
                            ),
                        ),
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: Some(
                    CompoundStyle {
                        object_style: ContentStyle {
                            foreground_color: None,
                            background_color: Some(
                                AnsiValue(
                                    236,
                                ),
                            ),
                            attributes: Attributes(
                                0,
                            ),
                        },
                    },
                ),
            },
            "status_italic": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                178,
                            ),
                        ),
                        background_color: Some(
                            AnsiValue(
                                236,
                            ),
                        ),
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: Some(
                    CompoundStyle {
                        object_style: ContentStyle {
                            foreground_color: Some(
                                AnsiValue(
                                    234,
                                ),
                            ),
                            background_color: Some(
                                AnsiValue(
                                    234,
                                ),
                            ),
                            attributes: Attributes(
                                0,
                            ),
                        },
                    },
                ),
            },
            "status_ellipsis": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                251,
                            ),
                        ),
                        background_color: Some(
                            AnsiValue(
                                233,
                            ),
                        ),
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: Some(
                    CompoundStyle {
                        object_style: ContentStyle {
                            foreground_color: Some(
                                AnsiValue(
                                    234,
                                ),
                            ),
                            background_color: Some(
                                AnsiValue(
                                    234,
                                ),
                            ),
                            attributes: Attributes(
                                0,
                            ),
                        },
                    },
                ),
            },
            "device_id_sep": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                102,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "git_deletions": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                160,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "pruning": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                244,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            16,
                        ),
                    },
                },
                unfocused: None,
            },
            "status_bold": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                178,
                            ),
                        ),
                        background_color: Some(
                            AnsiValue(
                                236,
                            ),
                        ),
                        attributes: Attributes(
                            4,
                        ),
                    },
                },
                unfocused: Some(
                    CompoundStyle {
                        object_style: ContentStyle {
                            foreground_color: Some(
                                AnsiValue(
                                    234,
                                ),
                            ),
                            background_color: Some(
                                AnsiValue(
                                    234,
                                ),
                            ),
                            attributes: Attributes(
                                0,
                            ),
                        },
                    },
                ),
            },
            "git_insertions": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                28,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "sparse": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                214,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "purpose_italic": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                178,
                            ),
                        ),
                        background_color: Some(
                            AnsiValue(
                                234,
                            ),
                        ),
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "perm__": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                237,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "purpose_bold": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                178,
                            ),
                        ),
                        background_color: Some(
                            AnsiValue(
                                234,
                            ),
                        ),
                        attributes: Attributes(
                            4,
                        ),
                    },
                },
                unfocused: None,
            },
            "help_code": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                253,
                            ),
                        ),
                        background_color: Some(
                            AnsiValue(
                                235,
                            ),
                        ),
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "preview": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                252,
                            ),
                        ),
                        background_color: Some(
                            AnsiValue(
                                233,
                            ),
                        ),
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: Some(
                    CompoundStyle {
                        object_style: ContentStyle {
                            foreground_color: Some(
                                AnsiValue(
                                    250,
                                ),
                            ),
                            background_color: Some(
                                AnsiValue(
                                    234,
                                ),
                            ),
                            attributes: Attributes(
                                0,
                            ),
                        },
                    },
                ),
            },
            "staging_area_title": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                254,
                            ),
                        ),
                        background_color: Some(
                            AnsiValue(
                                234,
                            ),
                        ),
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: Some(
                    CompoundStyle {
                        object_style: ContentStyle {
                            foreground_color: Some(
                                AnsiValue(
                                    252,
                                ),
                            ),
                            background_color: Some(
                                AnsiValue(
                                    235,
                                ),
                            ),
                            attributes: Attributes(
                                0,
                            ),
                        },
                    },
                ),
            },
            "preview_title": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                255,
                            ),
                        ),
                        background_color: Some(
                            AnsiValue(
                                234,
                            ),
                        ),
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: Some(
                    CompoundStyle {
                        object_style: ContentStyle {
                            foreground_color: Some(
                                AnsiValue(
                                    253,
                                ),
                            ),
                            background_color: Some(
                                AnsiValue(
                                    234,
                                ),
                            ),
                            attributes: Attributes(
                                0,
                            ),
                        },
                    },
                ),
            },
            "hex_ascii_whitespace": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                143,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "default": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                254,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: Some(
                    CompoundStyle {
                        object_style: ContentStyle {
                            foreground_color: Some(
                                AnsiValue(
                                    252,
                                ),
                            ),
                            background_color: None,
                            attributes: Attributes(
                                0,
                            ),
                        },
                    },
                ),
            },
            "help_table_border": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                239,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "purpose_normal": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                252,
                            ),
                        ),
                        background_color: Some(
                            AnsiValue(
                                234,
                            ),
                        ),
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "git_status_current": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                237,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "hex_null": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                240,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "file": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                254,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: Some(
                    CompoundStyle {
                        object_style: ContentStyle {
                            foreground_color: Some(
                                AnsiValue(
                                    247,
                                ),
                            ),
                            background_color: None,
                            attributes: Attributes(
                                0,
                            ),
                        },
                    },
                ),
            },
            "scrollbar_thumb": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                254,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: Some(
                    CompoundStyle {
                        object_style: ContentStyle {
                            foreground_color: Some(
                                AnsiValue(
                                    246,
                                ),
                            ),
                            background_color: None,
                            attributes: Attributes(
                                0,
                            ),
                        },
                    },
                ),
            },
            "device_id_minor": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                138,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
            "perm_w": SkinEntry {
                focused: CompoundStyle {
                    object_style: ContentStyle {
                        foreground_color: Some(
                            AnsiValue(
                                132,
                            ),
                        ),
                        background_color: None,
                        attributes: Attributes(
                            0,
                        ),
                    },
                },
                unfocused: None,
            },
        },
    ),
    special_paths: {
        Glob {
            pattern: Pattern {
                original: "/media",
                tokens: [
                    Char(
                        '/',
                    ),
                    Char(
                        'm',
                    ),
                    Char(
                        'e',
                    ),
                    Char(
                        'd',
                    ),
                    Char(
                        'i',
                    ),
                    Char(
                        'a',
                    ),
                ],
                is_recursive: false,
            },
        }: NoEnter,
    },
    search_modes: None,
    disable_mouse_capture: None,
    capture_mouse: None,
    cols_order: None,
    show_selection_mark: Some(
        true,
    ),
    ext_colors: {},
    syntax_theme: Some(
        MochaDark,
    ),
    true_colors: None,
    icon_theme: None,
    modal: None,
    max_panels_count: None,
    quit_on_last_cancel: None,
    file_sum_threads_count: None,
    max_staged_count: None,
    imports: [],
    show_matching_characters_on_path_searches: None,
    content_search_max_file_size: Some(
        10000000,
    ),
}
09:12:54.555 [DEBUG] broot::tree_build::builder: GitIgnorer::default() took 200ns
09:12:54.556 [DEBUG] broot::tree_build::builder: blines before trimming: 40
09:12:54.556 [DEBUG] broot::tree_build::builder: trimming prematurely interrupted
09:12:54.559 [DEBUG] broot::app::app: display panel took 452.1µs
09:12:54.559 [INFO] broot::app::app: pending_tasks took 400ns
09:12:54.559 [INFO] broot::app::app: event: TimedEvent { time: Instant { t: 607173.0564288s }, event: Resize(119, 29), double_click: false }
09:12:54.559 [DEBUG] broot::tree_build::builder: GitIgnorer::default() took 0ns
09:12:54.559 [DEBUG] broot::tree_build::builder: blines before trimming: 40
09:12:54.559 [DEBUG] broot::tree_build::builder: trimming prematurely interrupted
09:12:54.561 [DEBUG] broot::app::app: display panel took 306.2µs
09:12:54.561 [INFO] broot::app::app: pending_tasks took 300ns
09:12:55.836 [INFO] broot::app::app: event: TimedEvent { time: Instant { t: 607174.3344893s }, event: Key(KeyEvent { code: Char(' '), modifiers: NONE }), double_click: false }
09:12:55.837 [DEBUG] broot::app::app: command after add_event: VerbEdit(VerbInvocation { name: "", args: None, bang: false })
09:12:55.837 [DEBUG] broot::app::app: cmd_result: Keep
09:12:55.837 [DEBUG] broot::app::app: display panel took 336.4µs
09:12:55.838 [INFO] broot::app::app: pending_tasks took 100ns
09:12:56.221 [INFO] broot::app::app: event: TimedEvent { time: Instant { t: 607174.7186913s }, event: Key(KeyEvent { code: Char('?'), modifiers: SHIFT }), double_click: false }
09:12:56.221 [DEBUG] broot::app::app: command after add_event: VerbEdit(VerbInvocation { name: "?", args: None, bang: false })
09:12:56.221 [DEBUG] broot::app::app: cmd_result: Keep
09:12:56.221 [DEBUG] broot::app::app: display panel took 412.1µs
09:12:56.222 [INFO] broot::app::app: pending_tasks took 300ns
09:12:56.597 [INFO] broot::app::app: event: TimedEvent { time: Instant { t: 607175.0948914s }, event: Key(KeyEvent { code: Enter, modifiers: NONE }), double_click: false }
09:12:56.597 [DEBUG] broot::app::app: command after add_event: VerbInvocate(VerbInvocation { name: "?", args: None, bang: false })
09:12:56.597 [DEBUG] broot::app::app: cmd_result: NewState
09:12:56.598 [DEBUG] broot::app::app: display panel took 494.3µs
09:12:56.598 [INFO] broot::app::app: pending_tasks took 200ns
09:12:58.460 [INFO] broot::app::app: event: TimedEvent { time: Instant { t: 607176.9577421s }, event: Key(KeyEvent { code: Delete, modifiers: NONE }), double_click: false }

Zarenor avatar Dec 15 '22 14:12 Zarenor

@Zarenor To enter the help screen, you have to type  Enter, it doesn't open on just the  ? ?

Canop avatar Dec 15 '22 14:12 Canop

That's right. If I type ? Enter I get a search for ? and then go up one level (broot starts a search for '?' which isn't allowed in windows filenames)

Whereas if I type ? Enter I get the help. Or add the ? as the verb to a search etc.

Zarenor avatar Dec 15 '22 14:12 Zarenor

I confirm the bug is reproductible on powershell and classic cmd It does not happen when we open help with :help

beromont avatar Dec 15 '22 14:12 beromont

OK. Got it. It's not really Windows related. There's another problem on Windows making it impossible to open the help with just a ? (edit: this should be OK with the last commit).

The real problem is related to the "selection" not being cleanly cleaned when the input is cleaned. And the shift-? makes a selection somehow.

Canop avatar Dec 15 '22 14:12 Canop

Simpler reproduction, for linux too, from the main screen:

  1. type :fo
  2. press shift and the left arrow at the same time (thus selecting a character)
  3. hit enter
  4. hit delete
  5. enjoy (not really, especially if you're me and are going to debug Termimad)

Canop avatar Dec 15 '22 15:12 Canop

@Zarenor Can you confirm it's OK now ?

Canop avatar Dec 15 '22 15:12 Canop