When tmux has extended-keys enabled, Neovim's TermResponse autocmd doesn't fire,
causing terminal response sequences to leak as literal text into buffers.
Workaround: Detect this configuration and query tmux directly for the terminal
name using `tmux display-message -p "#{client_termname}"` instead of sending
escape sequences.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
## Description
Here are some small and hopefully uncontroversial tweaks to package
extraction from LaTeX preambles:
* Don't consider anything in comments
* Make sure that the extracted names are actually the arguments of
`\usepackage` and not some other macro on the same line
* Stop looking for packages at `\begin{document}`, where the preamble
ends and the body of the document begins (you can't load packages after
this, so any `\usepackage` beyond this point is content, not code. Also
saves a huge amount of work in large documents.)
Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
After cb6bf052, occationally I get this error when attach snacks.image
in fzf-lua previewer
vim.schedule callback: runtime/lua/vim/fs.lua:737:
ENOENT: no such file or directory:
/home/phan/.cache/nvim/snacks/image/56bd7d4f-img.shields.io-badge-Made-with-Lua-blueviolet.svg.data
stack traceback:
[C]: in function 'error'
runtime/lua/vim/fs.lua:737: in function 'rm'
snacks.nvim/lua/snacks/image/convert.lua:66: in function 'on_error'
snacks.nvim/lua/snacks/image/convert.lua:340: in function 'on_step'
snacks.nvim/lua/snacks/image/convert.lua:434: in function
<snacks.nvim/lua/snacks/image/convert.lua:433>
PR #2296 had the conditionals in the wrong order and with an "or"
instead of an "and". This should finally fix the issue and pass
stylelua.
## Description
The correct condition for correcting the off-by-one is:
```
if
(Snacks.config.styles.snacks_image.relative ~= "editor")
and ((vim.o.showtabline == 2) or (vim.o.showtabline == 1 and vim.fn.tabpagenr("$") > 1))
then
```
This patch gets the conditional in the right order
In PR 1560, @phanen reported an additional case that was not handled by
that fix when the style is set to `relative = "editor"`. This new patch
adds a check to handle that case.
## Description ##
This patch adds a check for `Snacks.config.styles.snacks_image.relative
~= "editor"` to the conditional in render_fallback that handles the
off-by-one error. The previous patch fixed the relative = "cursor" case,
but introduced a regression in the relative = "editor" case.
## Description
Allow specifying a page number for pdfs inside of markdown.
This is done by adding "#page=<page-number>" to the file name. This is
same way it is done in obsidian (as discussed in
https://forum.obsidian.md/t/link-to-the-exact-page-of-and-external-pdf-file/2111)
The parsing of the page info should probably be done way before the
conversion, but this was the best I could with my limited time.
I'm pretty new to lua, and this codebase, so this might not be the best
code, but I hope it at least helps :D
## Related Issue(s)
- Fixes#1805
Fix off-by-one issue in render_fallback when a tabline is shown (e.g.
with plugins like bufferline.nvim).
## Description
When a tabline is used/shown, the positioning in render_fallback is off
by one. This change checks whether a tabline would be shown and uses the
correct math for that case and, otherwise, works as before.
## Related Issue(s)
- Fixes#1557
## Description
If fetching an image fails, when the buffer with the image is opened
again, the error message shown is for the `identify` command rather than
the `url` command. This is because the output of the `wget` or `curl`
command is saved to the file even if the fetching fails. Thus, when we
try to resolve it again, we think it's cached and read the file on the
`identify` step only to fail.
## Related Issue(s)
did not find any
When `winblend > 1`
(8de1dc6923/src/nvim/highlight.c (L751)),
hover image is not shown (in kitty).
Reproduce: `nvim +'set winblend=10' docs/image.md +2`
I have a `vim.o.winblend = 20` in global config before floatwin created.
That's why I notice it.
Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>