Skip to content

feature: replace InsertCharPre with TextChangedI#4

Open
gabeklavans wants to merge 2 commits intoYannickFricke:masterfrom
gabeklavans:master
Open

feature: replace InsertCharPre with TextChangedI#4
gabeklavans wants to merge 2 commits intoYannickFricke:masterfrom
gabeklavans:master

Conversation

@gabeklavans
Copy link

@gabeklavans gabeklavans commented Jan 16, 2024

to capture all text changes in insert mode, including backspace

https://neovim.io/doc/user/autocmd.html#TextChangedI

I'm not sure how to check when this event was added; it may change the minimum version of NeoVim required.

@YannickFricke
Copy link
Owner

@gabeklavans Thanks for the PR!

I remember that there was one thing why I couldn't use TextChangedI - but not exactly what it was...
Did you successfully tested the changes?

The oldest references I can find in the NVIM repo regarding TextChangedI are 10 years old - so there are good chances that I tried that out before using InsertCharPre :)

@gabeklavans
Copy link
Author

I remember that there was one thing why I couldn't use TextChangedI - but not exactly what it was...

Yeah I figured you'd seen this as an option.

Did you successfully tested the changes?

Briefly, but yes. I did a bunch of typing and text manipulation while watching the XP counter from the getxp function, and it seemed to be accurate. I can test it on my local in real-world use for a bit, if you'd like.

The oldest references I can find in the NVIM repo regarding TextChangedI are 10 years old - so there are good chances that I tried that out before using InsertCharPre :)

I also observed this after making the PR lol

@YannickFricke
Copy link
Owner

YannickFricke commented Jan 16, 2024

I can test it on my local in real-world use for a bit, if you'd like.

That sounds good - I will do the same over the next few days.

Need to re-setup my NVIM :D

@gabeklavans
Copy link
Author

gabeklavans commented Feb 2, 2024

@YannickFricke How has testing been going for you? I've been using my fork and haven't noticed any anomalies in my stats.

It's hard to fully claim it's accurate because I'm not usually watching my XP counter in the bottom right but when I do glance at it, it appears to act normally.

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