Skip to content

Conversation

@alex-courtis
Copy link
Member

fixes #1626

splitright and splitbelow were not being obeyed when splitting a non-nvim-tree window.

local split_side = (view.View.side == "right") and "aboveleft" or "belowright"

local create_new_window = #api.nvim_list_wins() == 1
local new_window_side = (view.View.side == "right") and "aboveleft" or "belowright"
Copy link
Member Author

Choose a reason for hiding this comment

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

I resisted further refactoring.

@alex-courtis
Copy link
Member Author

Test cases:

Each of

  • defaults
  • defaults: splitright and splitbelow
  • right
  • right: splitright and splitbelow

Tested with

@alex-courtis alex-courtis merged commit c4ac723 into master Oct 14, 2022
@alex-courtis alex-courtis deleted the 1626-open-file-split-not-obeying-splitright-splitbelow branch December 16, 2022 04:38
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.

vsplit always opens to the left, can it be on the right?

3 participants