Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:ObsidianFollowLink vsplit only works when the file's buffer does not exist #501

Closed
parmort opened this issue Mar 18, 2024 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@parmort
Copy link
Contributor

parmort commented Mar 18, 2024

🐛 Describe the bug

If nvim has never loaded the target file, :ObsidianFollowLink vsplit (along with the hsplit variant) works as expected, opening the file in a new window. However, if nvim had loaded the file (regardless of if the buffer still exists or not), the command would open the file in the current window. I would expect that the command respects the buffer list, creating a new window only when the buffer is not actively displayed elsewhere.

Config

require('obsidian').setup {
  workspaces = {
    {
      name = "vault",
      path = "~/documents/vault"
    }
  },
}

Environment

nvim --version

NVIM v0.9.5
Build type: RelWithDebInfo
LuaJIT 2.1.1692716794
Compilation: /usr/bin/cc -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wvla -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -fno-common -Wno-unused-result -Wimplicit-fallthrough -fdiagnostics-color=always -fstack-protector-strong -DUNIT_TESTING -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -I/home/nolan/build/neovim/.deps/usr/include/luajit-2.1 -I/usr/include -I/home/nolan/build/neovim/.deps/usr/include -I/home/nolan/build/neovim/build/src/nvim/auto -I/home/nolan/build/neovim/build/include -I/home/nolan/build/neovim/build/cmake.config -I/home/nolan/build/neovim/src -I/usr/include -I/home/nolan/build/neovim/.deps/usr/include -I/home/nolan/build/neovim/.deps/usr/include -I/home/nolan/build/neovim/.deps/usr/include -I/home/nolan/build/neovim/.deps/usr/include -I/home/nolan/build/neovim/.deps/usr/include -I/home/nolan/build/neovim/.deps/usr/include

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/share/nvim"

Run :checkhealth for more info

nvim --headless -c 'lua require("obsidian").info()' -c q

Obsidian.nvim v3.7.3 (450c3dabffa395502800d6ac0b1d1dcd5d89f80e)
Status:
   buffer directory: nil
   working directory: /home/nolan
Workspaces:
  ✓ active workspace: Workspace(name='vault', path='/home/nolan/documents/vault', root='/home/nolan/documents/vault')
Dependencies:
   plenary.nvim: f7adfc4b3f4f91aab6caebf42b3682945fbc35be
   telescope.nvim: e9e01d699843af530ef4ad2c8679a7e273bb3dd1
Integrations:
   picker: TelescopePicker()
   completion: disabled
Tools:
   rg: ripgrep 14.1.0
Environment:
   operating system: Linux
Config:
   notes_subdir: nil
@parmort parmort added the bug Something isn't working label Mar 18, 2024
@epwalsh
Copy link
Owner

epwalsh commented Mar 19, 2024

Hey @parmort, I believe I fixed that in b2df42f. Let me know if you still have issues.

@parmort
Copy link
Contributor Author

parmort commented Mar 19, 2024

It looks like it's all fixed! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants