Giter Club home page Giter Club logo

Comments (7)

linde12 avatar linde12 commented on August 17, 2024 1

Thanks @cmyr ❤️ I think it's pretty clear!

from kod.

emigr2k1 avatar emigr2k1 commented on August 17, 2024

This bug doesn't happen to me. Is this fixed?

from kod.

linde12 avatar linde12 commented on August 17, 2024

Hmm, with a file with only one or two lines in it it works as intended now when i retest. But if i try editing the a larger file, e.g. README.md in kod, it displays more lines than there is and as soon as i move the cursor it goes away.

from kod.

linde12 avatar linde12 commented on August 17, 2024

Let me know if you are still unable to reproduce @emigr2k1

from kod.

emigr2k1 avatar emigr2k1 commented on August 17, 2024

@linde12, I can reproduce it now. I think the issue is related to this line. In this line, first there's only a chunk of lines and lc.invalidAfter is [(total number of lines) - (current number of lines)] but after some draw()s lc.invalidAfter is always 12. So gutter will always have 12 more lines than it should have. Maybe this number changes on other environments.
And the root of the problem should be here. The problem starts when Kod receives an update with "op"="copy". If I put a lc.invalidAfter = 0 inside that «else if» now it does display the gutter correctly. But honestly... I don't know why.
I'm confused about what invalidAfter and invalidBefore means, could you explain me?

from kod.

linde12 avatar linde12 commented on August 17, 2024

@emigr2k1 Great. It was a while since i worked on this and back then the documentation wasn't the best so i'm not sure i can be much of help here. I see that the docs has changed since then and reading the description over here looks pretty promising: https://xi-editor.github.io/xi-editor/docs/frontend-protocol.html#update

The linecache implementation might have to be reimplemented, but if resetting invalidAfter works maybe we can stick with it for now? It'd be interesting to know why though... 😅

from kod.

cmyr avatar cmyr commented on August 17, 2024

If you have confusions about the protocol please open an issue in https://github.com/xi-editor/xi-editor, or @ me in an issue here. There's also #xi on irc.mozilla.org.

from kod.

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.