Comments (7)
Thanks @cmyr ❤️ I think it's pretty clear!
from kod.
This bug doesn't happen to me. Is this fixed?
from kod.
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.
Let me know if you are still unable to reproduce @emigr2k1
from kod.
@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.
@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.
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)
- Vertical scrolling not working HOT 6
- Closing with Ctrl+Q makes the terminal glitch HOT 5
- feat: user configs HOT 2
- Editor crashes when a file is saved and cursor is not in viewport HOT 5
- Doesn't build as per the README's instructions HOT 2
- Right-to-left languages seem to be unhandled HOT 4
- Need some sort of file handling interface HOT 1
- update kod to set config_dir in order to load syntect HOT 1
- support writing golang in it? HOT 3
- Add license
- Separate default keybinds per platform HOT 2
- Cannot do go build HOT 2
- Line numbers should start on 1 not on 0
- Some runes use more than 8bytes and is rendered with a space after HOT 6
- Keybindings HOT 1
- Change to bufio.NewReader(c.rw) instead of bufio.NewScanner(c.rw) in connection.go
- bump tcell to v1.1.0 HOT 1
- Only partial text gets pasted HOT 1
- stupid question HOT 1
- still being maintained/worked on? HOT 1
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 kod.