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

feat: add option to disable name truncation #533

Merged
merged 4 commits into from
Sep 2, 2022
Merged

Conversation

akinsho
Copy link
Owner

@akinsho akinsho commented Sep 2, 2022

This fixes #532 by allowing a user to set autosize = true in config.options. With this enabled, users can allow filename to extend up to their full name length.

image

Can you test this out @ray-x, I might change the option name in future commits since I'm not sure I like autosize it's really not very descriptive.

TODO

  • Docs
  • Tests

@ray-x
Copy link
Contributor

ray-x commented Sep 2, 2022

Thanks for the quick PR. It is great and autosize works for me.
However, I saw a issue. It may not related to this PR. I have 3 file in buffer. However if the windows size is small. There is a corner cases I failed to move to next tab. Please refer to the video.

test1-2022-09-02_21.07.48.mp4

@akinsho
Copy link
Owner Author

akinsho commented Sep 2, 2022

@ray-x I don't think I still understand what is going wrong there. What is the behaviour you are expecting? Just to clarify, the truncation markers are not buttons, so you cannot click on them.

@akinsho
Copy link
Owner Author

akinsho commented Sep 2, 2022

Anyway, if you can clarify the bug feel free to raise an issue. In the meantime I will merge this PR into the dev branch for release into the main branch later on.

@akinsho akinsho changed the title feat: allow filenames to exceed the max tab name length feat: add option to disable name truncation Sep 2, 2022
@akinsho akinsho merged commit 0caca76 into dev Sep 2, 2022
@akinsho akinsho deleted the feature/add-autosize branch September 2, 2022 11:45
@ray-x
Copy link
Contributor

ray-x commented Sep 2, 2022

There are 2 cases that not smooth.

  • case 1
    suppose I have three files, long_file_name_file_1, long_file_name_file_2, long_file_name_file_3. What I saw is
    | empty_space |long_file_name_file_2| empty_space |

There is no way I can use mouse to move to the next buffer. I have to use bnext/bprev (also BufferLinePick not working as only one tab is shown)

  • case 2
    3 files, as above, but 2 of them are shown in bufferline tab
    | long_file_name_file_1 | long_file_name_file_2|
    What I expected is if I change focus to long_file_name_file_2, the tab should look like this:
    | long_file_name_file_2 | long_file_name_file_3|
    If I click on long_file_name_file_2, it should look like this:
    | long_file_name_file_1 | long_file_name_file_2|

Is it possible to show at least 2 tabs and the behavior this way (suppose I have 5 files and 3 of them are shown)
| long_file... | long_file_name_file_3 | long_file... |
If I click on long_file... on the right, it will be
| long_file... | long_file_name_file_4 | long_file... |
If I click on long_file... on the left, it will be
| long_file... | long_file_name_file_2 | long_file... |

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

2 participants