Closed alaaibrahim closed 8 years ago
Thank you for the patch. I appreciate that you took the time to update the docs. The patch doesn’t handle the g:buftabline_numbers
case though… so I can’t take it as it is. That case is not as trivial to patch as the unnumbered case, because that design really only works well if unnamed files are shown as “*”. Which is why I did not make this configurable in the first place – I’m picky with visual design, it wasn’t easy to make this completely configurable, this layout looked best to me, so I just hardcoded it.
However, it seems a popular enough desire to be able to change this. I’ve seen such changes in other forks that didn’t submit PRs. So I’ll take some time to come up with designs to cover all the bases.
Sorry I’m not taking your patch as it is; I hope that you’re not too disappointed, and that getting the feature anyway will make up for it.
@ap thanks for the review, I modified the code to cover the buftabline_numbers case. If that doesn't work for you, feel free to just ignore it.
It's your repo, so you can be as picky as much as you want :smile:. Also, I guess it goes without saying, but thanks for the plugin.
Sorry I haven’t gotten around to this yet. It’s still going to happen.
Sorry, I closed it because I made another change (to make the plugin work on vim 7.2), feel free to incorprate that commit if you think it's something that you want, I know most people don't care about supporting older versions of vim. https://github.com/alaaibrahim/vim-buftabline/commit/2b1d919e646e50168348204e2df637b9466ce8d3
I do care. Unfortunately it’s not as easy as that patch… that function will give the wrong answer for e.g. fullwidth.txt
– which is relevant for filenames in various Asian scripts. OTOH I guess it’s not a big enough concern to warrant it not running on these versions at all… even strwidth
is wrong in the face of control characters (as is strdisplaywidth
) after all.
@ap I made another implementation for the strwidth which should cover all these cases https://github.com/ap/vim-buftabline/pull/14.
This will not fix strwidth, it will only mimic it's return value
As of a1f6c24aed2dfe2e3db5122de858b83a1eab987f the plugin will work about as well as one can hope for on Vims older than 7.3, all the way back to 7.0.
That just leaves the configurable label for unnamed buffers.
Currently, opening an unnamed buffer would display ('*'), as the title, so adding the ability for the user to override that value (e.g. name it 'No Name').