sindrets / diffview.nvim

Single tabpage interface for easily cycling through diffs for all modified files for any git rev.
Other
3.57k stars 101 forks source link

feat: use `vim.notify` for user notifications #507

Closed emmanueltouzery closed 1 month ago

emmanueltouzery commented 1 month ago

fixes #473 vim.notify allows the user to customize the display of messages

I'm not sure about the schedule parameter, whether it's still needed. I left it in just in case.

The testing I performed is that I triggered the:

"The file is open with unsaved changes! Aborting file restoration."

message, by modifying a file, saving, modifying again, then asking to revert the changes in diffview, that triggered that message. I also tried modifying the location where the message is triggered to ask to trigger it with the schedule parameter being "true" and that worked too.

emmanueltouzery commented 1 month ago

I force pushed the removal the nil-check now. I had it in because the previous code also had it (well, it had if not msg[1]). Thank you for the explanation for schedule!

emmanueltouzery commented 1 month ago

my bad about the type signature :grimacing: force pushed the fix now.