Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line numbering w/ respect to deletion #67

Closed

Conversation

Gladdstone
Copy link

This was mentioned in a now-closed issue. The change is to count lines with respect to line deletion by means of a delete queue as shown below.

Still familiarizing myself with the Yew framework so if you come across any glaring issues please let me know.

Screenshot 2024-10-20 at 12 15 10 PM

@xfbs
Copy link
Owner

xfbs commented Oct 20, 2024

I think this is a good start, but it looks like it's not fully correct yet?

If you look at the screenshot, line 17 is missing.

My feeling is that we should evaluate the data structures we are using and capture line information properly, instead of "recreating" them when we render the diff.

But I will take a closer look at your PR tomorrow, when I have a fresh mind.

@Gladdstone
Copy link
Author

ty, that's my bad. The index skips ahead when you group the deletions, I'd made a note to fix it and forgotten.

I agree that modifying the construction of the change object upstream would be a much more elegant solution. I was initially concerned that might be too disruptive a change to the code but I'd be happy to look into it.

@Gladdstone Gladdstone closed this Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants