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

fix: split from buffer view opens blank buffer (#898) #1004

Conversation

agoodshort
Copy link
Contributor

Fix an issue in buffer view, where a blank buffer would open instead of the selected buffer when using the open_split shortcut.

More details on #898

@cseickel cseickel merged commit 94d58fa into nvim-neo-tree:main Jun 21, 2023
3 checks passed
@pysan3
Copy link
Collaborator

pysan3 commented Jun 21, 2023

Hey @cseickel, this is broken.

See the review I added above inside the code.

@cseickel
Copy link
Contributor

@pysan3 I don't see any review or comments, an you link to them and/or repeat them here?

@pysan3
Copy link
Collaborator

pysan3 commented Jun 21, 2023

Sorry that I don't know how to link a review but it's this

image

@cseickel
Copy link
Contributor

Oh I see, your review is still pending @pysan3, no one else can see it until you submit it.

@cseickel
Copy link
Contributor

I'll fix it.

@@ -551,13 +551,14 @@ end
---@param bufnr number|nil The buffer number to open
M.open_file = function(state, path, open_cmd, bufnr)
open_cmd = open_cmd or "edit"
if open_cmd == "edit" or open_cmd == "e" then
local cmd_for_buf = { edit = "b", e = "b", split = "sb", sp = "sb" }
if open_cmd[cmd_for_buf] ~= nil then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be if cmd_for_buf[open_cmd] ....

It's the other way around.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now I can see it! 😄

@pysan3
Copy link
Collaborator

pysan3 commented Jun 21, 2023

Damn, this was my first time to use review.

I think I was able to figure it out?

Can you see it now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants