diff options
author | Mathias Fußenegger <mfussenegger@users.noreply.github.com> | 2024-11-25 17:11:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-25 17:11:22 +0100 |
commit | 99e7323aa386865035ad79483a7da0c5b106464f (patch) | |
tree | 059e0659ebe0e771a2b6ffe297a7783adccec569 /runtime/lua/vim/diagnostic.lua | |
parent | 165b099fa38c5f4a9855cda3d13575bf63767647 (diff) | |
download | rneovim-99e7323aa386865035ad79483a7da0c5b106464f.tar.gz rneovim-99e7323aa386865035ad79483a7da0c5b106464f.tar.bz2 rneovim-99e7323aa386865035ad79483a7da0c5b106464f.zip |
feat(diagnostic): inherit parent 'path' option in open_float (#31273)
Diagnostics sometimes contain stack traces, it's useful being able to
use `CTRL-W F` on them to open related files from within the diagnostic
window.
Diffstat (limited to 'runtime/lua/vim/diagnostic.lua')
-rw-r--r-- | runtime/lua/vim/diagnostic.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/lua/vim/diagnostic.lua b/runtime/lua/vim/diagnostic.lua index 4fb8c6a686..2de996feeb 100644 --- a/runtime/lua/vim/diagnostic.lua +++ b/runtime/lua/vim/diagnostic.lua @@ -1962,6 +1962,7 @@ function M.open_float(opts, ...) opts.focus_id = scope end local float_bufnr, winnr = vim.lsp.util.open_floating_preview(lines, 'plaintext', opts) + vim.bo[float_bufnr].path = vim.bo[bufnr].path for i, hl in ipairs(highlights) do local line = lines[i] local prefix_len = hl.prefix and hl.prefix.length or 0 |