Skip to content

Having to confirm twice on operation cancel #87

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

Closed
kkharji opened this issue Jan 26, 2022 · 6 comments
Closed

Having to confirm twice on operation cancel #87

kkharji opened this issue Jan 26, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@kkharji
Copy link
Member

kkharji commented Jan 26, 2022

Description

This is annoying a bit. the second line printed makes the prompt stay there instead of just be printed in console.
Screen Shot 2022-01-26 at 3 04 36 PM

maybe differing results would make sense and solve this?

Neovim version

NVIM v0.6.1

Operating system and version

macOs

Steps to reproduce

  1. create/rename/delete
  2. cancel or confirm
  3. console await user input

Expected behavior

after confirming or canceling action the focus should be back on the browser

Actual behavior

Await additional input.

Minimal config

..
@kkharji kkharji added the bug Something isn't working label Jan 26, 2022
@fdschmidt93
Copy link
Member

fdschmidt93 commented Jan 26, 2022

Yeah, I've realized that commandline interaction & printing is not perfect. I'd hope that this would be resolved by switching towards notifications?

#72

I have to setup notifications and take a look at that PR.

@kkharji
Copy link
Member Author

kkharji commented Jan 26, 2022

I guess it would be a by product of #72.

@jamestrew
Copy link
Collaborator

Unfortunately #72 doesn't solve this Press ENTER or type command to continue issue.

I'll look into it a bit more within the next couple of days. All I know is that stacking too many multline vim.notify or print beyond the cmdheight is the culprit. I'm not super sure how to force clear what's in the command bar besides throwing a vim.api.nvim_command('norm :esc<CR>') between the vim.notifys which feels very janky and dumb.

@kkharji
Copy link
Member Author

kkharji commented Jan 27, 2022

Hmmm maybe then no new lines? flat text

@fdschmidt93
Copy link
Member

So I've been cleaning up my dots a bit and also finally got around to installing nvim-notify and playing with that a bit.

I'll probably take over #72 eventually with my own PR (though borrowing some ideas :), from what I can tell there's two-three options here:

  • swapping vim.notify with nvim-notify
  • increasing cmdheight intermittently (a bit messy)
  • Put messages into 1 line (as will my refactor) and then vim.cmd [[ redraw! ]] seems to work such that the 1 line solely remains in cmdline

As I understand it, hit-enter prompt is essentially triggering the redraw as it's otherwise not clear for (n)vim how to handle intermediate excess cmdheight.

@fdschmidt93
Copy link
Member

This should hopefully be addressed now, so closing :)

Please let me know otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants