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.
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