We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95d7047 commit 38e61dfCopy full SHA for 38e61df
lua/orgmode/utils/promise.lua
@@ -66,7 +66,13 @@ local new_pending = function(on_fullfilled, on_rejected)
66
end
67
self._handled = true
68
vim.schedule(function()
69
- local values = vim.inspect({ self._value:unpack() }, { newline = '', indent = '' })
+ local value = self._value:unpack()
70
+ -- Do not report keyboard interrupt errors as unhandled.
71
+ -- There is no way to handle pressed "<C-c>" while waiting for a promise.
72
+ if value == 'Keyboard interrupt' then
73
+ return
74
+ end
75
+ local values = vim.inspect({ value }, { newline = '', indent = '' })
76
error('unhandled promise rejection: ' .. values, 0)
77
end)
78
0 commit comments