-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
adds --vsplit and --hsplit arguments #2773
adds --vsplit and --hsplit arguments #2773
Conversation
What happens if the user opens so many buffers with splits that it can't fit in the editor? Is there a limit? Should there be? |
There's a practical limit that will lead to a panic with |
That scenario is probably better resolved in a separate PR then. |
From what I have been able to gather, the limit of splits you can have does in With a terminal of size 2576x1426, the max number of splits the editor can open If one opens more buffers than the editor can "hold", the program panics and
This line is inside a function called |
…ut>, and some cleanup
Little detail, but instead of defaulting to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great 👍
Thanks for updating the completion too 😀
adds the
--vsplit
and--hsplit
features as proposed by #2709.When multiple files are opened in the editor via the command line, i.e.
hx test1.txt test2.txt
, the user can use these new arguments to tell the program how these files should be presented.hx test1.txt test2.txt --vsplit
opens both files side-by-side, whereashx test1.txt test2.txt --hsplit
opens them on top of each other.I also added the new arguments to the completion scripts (hopefully correctly).
If the user passes in both of these options,
--vsplit
is used as a default.