Comments (7)
The issue with that is that there's no maximum value for line and column numbers. However, I did fix the issue in the latest commit. The problem is it assumes line numbers to have no more than 3 digits and column numbers to have no more than two digits.
Either way, I fixed the issue. Check if it works for you now so that I may close this. Unless you have a better solution for the line / column number size problem.
from feline.nvim.
Awesome thanks.
The problem is it assumes line numbers to have no more than 3 digits and column numbers to have no more than two digits.
Yes, you are right, that can be a problem when opening huge files.
Unless you have a better solution for the line / column number size problem.
I'll look into that. I think that first checking how many characters are returned from vim.fn.line('.')
and vim.fn.col('.'))
and then setting the width in base of that could be an option.
For now this can be closed.
from feline.nvim.
I'll look into that. I think that first checking how many characters are returned from vim.fn.line('.') and vim.fn.col('.')) and then setting the width in base of that could be an option.
The line number and column number are constantly changing though, so setting the width based on that means the statusline would constantly change as well, bringing us back to where we started
from feline.nvim.
The problem is it assumes line numbers to have no more than 3 digits and column numbers to have no more than two digits.
Also I worded this wrong, the providers would still work fine for numbers larger than that, but, it'd move its contents like how it used to before
from feline.nvim.
The line number and column number are constantly changing though, so setting the width based on that means the statusline would constantly change as well, bringing us back to where we started
oh yes you're absolutely right.
What you think about first getting the total amount of lines of the file and then setting the width? I think that for the edge cases where for example opening a file with a compressed line of code with hundreds of columns shouldn't be something to worry about. As you said it would still work, just shifting the elements once again.
The other problem with first getting the total amount of lines is that in case of opening a huge file, then the width is going to be really big even when being in the first lines of the file, making it look weird.
But once again those are more of edge cases, maybe setting a max width. So in case of opening a big file, the elements will have a fixed wdith until a certain numbers of characters, after that it will just shift the components like before.
from feline.nvim.
Hey I've been testing opening big files and honestly it's perfectly fine now. The annoying part was having the statusline shift on almost every line I moved.
But now with the fixed width it only shifts when it reaches the maximum amount of characters that have been set . And this only happens every... I don't know the exact number but the point is that I have to move a lot through the file to have the statusline shift. And once again the annoying part was when it was happening every second, that was what made it so noticeable for me and annoying at moments. But hey, if it only happens every now and then, I have no problem with that.
from feline.nvim.
Hey I've been testing opening big files and honestly it's perfectly fine now. The annoying part was having the statusline shift on almost every line I moved.
But now with the fixed width it only shifts when it reaches the maximum amount of characters that have been set . And this only happens every... I don't know the exact number but the point is that I have to move a lot through the file to have the statusline shift. And once again the annoying part was when it was happening every second, that was what made it so noticeable for me and annoying at moments. But hey, if it only happens every now and then, I have no problem with that.
Yes that makes sense. Glad it works then.
from feline.nvim.
Related Issues (20)
- Question: Background color of statusline does not change. HOT 2
- [Feature] HOT 2
- How do I configure feline as "default with no icons" HOT 2
- Changing single option without needing to add whole config HOT 2
- [Feature] Change the path seperator for the file_info provider HOT 2
- Unimplemented theme support HOT 5
- E542: Unbalanced groups HOT 8
- [Bug] adding 'neo-tree' to force-inactive table has no effect HOT 4
- Add my feline config link to your README.
- statusline config
- [Feature] An option for a small clock in the status bar HOT 1
- [Bug] cmdheight=0 not working HOT 12
- [Bug] Winbar disappears from inactive pane HOT 2
- [Bug] E5108: Error executing lua ... E539: Illegal character < > | Strings Ending With %% HOT 4
- [Bug] Actually disable winbar when using `disable` option HOT 3
- Error after install HOT 4
- [Feature] Feature request: component stack HOT 10
- [Bug] Starting Error
- [Bug] Global function `module` gets overwritten by feline HOT 2
- [Feature] Use a function to selectively update highlights
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from feline.nvim.