diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2024-12-16 04:00:20 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-16 04:00:20 -0800 |
commit | 167a2383b9966ac227a77b0221088246e14ce75a (patch) | |
tree | d509817042d19ba96a3305abdc62f1f7a67054ab /test/functional/api/window_spec.lua | |
parent | 9c6a3703bb15d56fecdd962512f69f0ccf6d398c (diff) | |
download | rneovim-167a2383b9966ac227a77b0221088246e14ce75a.tar.gz rneovim-167a2383b9966ac227a77b0221088246e14ce75a.tar.bz2 rneovim-167a2383b9966ac227a77b0221088246e14ce75a.zip |
fix(api): not using TRY_WRAP, generic error messages #31595
Problem:
- API functions using `try_start` directly instead of `TRY_WRAP`, do not
surface the underlying error message, and instead show generic things
like "Failed to set buffer".
- Error handling code is duplicated in the API impl, instead of
delegating to the vim buffer/window handling logic.
Solution:
- Use `TRY_WRAP`.
Diffstat (limited to 'test/functional/api/window_spec.lua')
-rw-r--r-- | test/functional/api/window_spec.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/functional/api/window_spec.lua b/test/functional/api/window_spec.lua index 92999f383a..4662ace4bf 100644 --- a/test/functional/api/window_spec.lua +++ b/test/functional/api/window_spec.lua @@ -1664,7 +1664,7 @@ describe('API/win', function() autocmd BufWinEnter * ++once let fired = v:true ]]) eq( - 'Failed to set buffer 2', + 'Vim:E37: No write since last change (add ! to override)', pcall_err(api.nvim_open_win, api.nvim_create_buf(true, true), false, { split = 'left' }) ) eq(false, eval('fired')) |