Giter Club home page Giter Club logo

Comments (7)

famiu avatar famiu commented on August 17, 2024

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.

rafamadriz avatar rafamadriz commented on August 17, 2024

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.

famiu avatar famiu commented on August 17, 2024

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.

famiu avatar famiu commented on August 17, 2024

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.

rafamadriz avatar rafamadriz commented on August 17, 2024

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.

rafamadriz avatar rafamadriz commented on August 17, 2024

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.

famiu avatar famiu commented on August 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.