Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A confirmation prompt will pop up when the quit command is called by plugin #993

Closed
MasouShizuka opened this issue May 3, 2024 · 2 comments · Fixed by #997
Closed

A confirmation prompt will pop up when the quit command is called by plugin #993

MasouShizuka opened this issue May 3, 2024 · 2 comments · Fixed by #997
Assignees
Labels
feature New feature request

Comments

@MasouShizuka
Copy link

What system are you running Yazi on?

Windows

What terminal are you running Yazi in?

wezterm 20240203-110809-5046fc22

Did you try the latest code to see if this problem got fixed?

Tried, but the problem still

yazi --debug output

Yazi
    Version: 0.2.5 (c65a14c 2024-04-23)
    OS: windows-x86_64 (windows)
    Debug: false

Emulator
    Emulator.via_env: ("xterm-256color", "WezTerm")
    Emulator.via_csi: Ok(Unknown([]))
    Emulator.detect: WezTerm

Adaptor
    Adaptor.matches: Iterm2

Desktop
    XDG_SESSION_TYPE: None
    WAYLAND_DISPLAY: None
    DISPLAY: None

SSH
    shared.in_ssh_connection: false

WSL
    /proc/sys/fs/binfmt_misc/WSLInterop: false

Variables
    SHELL: Some("C:\\msys64\\usr\\bin\\zsh.exe")
    EDITOR: Some("nvim")
    ZELLIJ_SESSION_NAME: None
    YAZI_FILE_ONE: Some("C:/Program Files/Git/usr/bin/file.exe")
    YAZI_CONFIG_HOME: None

file(1)
    Version: Ok(Output { status: ExitStatus(ExitStatus(0)), stdout: "file-5.45\nmagic file from /usr/share/misc/magic\n", stderr: "" })

Text Opener
    default: Some(Opener { run: "code \"%*\"", block: false, orphan: true, desc: "code", for_: None, spread: true })
    block: Some(Opener { run: "code -w \"%*\"", block: true, orphan: false, desc: "code (block)", for_: None, spread: true })

tmux
    TMUX: false

Ueberzug++
    Version: Err(Error { kind: NotFound, message: "program not found" })


--------------------------------------------------
When reporting a bug, please also upload the `yazi.log` log file - only upload the most recent content by time.
You can find it in the "C:\\Users\\MasouShizuka\\AppData\\Roaming\\yazi\\state" directory.

Describe the bug

When a plugin calls a function containing quit, a confirmation prompt will pop up because the current plugin is being called, for example:

local quit_and_save_something = ya.sync(function(state)
    -- saving something

    ya.manager_emit("quit", {})
end)

Expected Behavior

No confirmation prompt pops up.

To Reproduce

Write a plugin and call the function like:

local quit_and_save_something = ya.sync(function(state)
    -- saving something
    ya.notify({
        title = "test",
        content = "message",
        timeout = 3,
    })

    ya.manager_emit("quit", {})
end)

Configuration

No response

Anything else?

No response

@MasouShizuka MasouShizuka added the bug Something isn't working label May 3, 2024
@sxyazi sxyazi self-assigned this May 3, 2024
@sxyazi sxyazi added feature New feature request and removed bug Something isn't working labels May 3, 2024
@sxyazi
Copy link
Owner

sxyazi commented May 3, 2024

Please try #997

@sxyazi sxyazi added the waiting on op Waiting for more information from the original poster label May 3, 2024
@sxyazi sxyazi removed the waiting on op Waiting for more information from the original poster label May 3, 2024
Copy link

github-actions bot commented Jun 3, 2024

I'm going to lock this issue because it has been closed for 30 days. ⏳
This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants