Draft
Conversation
… completion plugin The 'insert_text' signal gives more detail about how the document contents have changed, giving us a way to more accurately update the prefix tree used for word completion
…dded. Not just one character
…boundaryto the Word Completion plugin
* Detect when cursor moves off insertion line
Collaborator
Author
|
@colinkiama If you have time to try and break this I would be grateful! The logic is quite involved so it is hard to be sure it copes with all circumstances. |
Collaborator
Author
|
At the moment this only works reliably in OS7.1. There are some weird bugs when running it on OS8 inside a Gnome Boxes VM. Not sure why - maybe a timing thing? Converting back to draft while investigating. |
Collaborator
Author
|
Seems to work in OS8 in a Virtual Machine Manager VM. So marking ready. |
Member
|
This is a really big PR. Can this be split up into more reviewable chunks at all? |
Collaborator
Author
|
@danirabbit Thanks for taking a look. I'll see what I can do. |
This was referenced Jan 30, 2025
# Conflicts fixed: # plugins/word-completion/prefix-tree-node.vala # plugins/word-completion/prefix-tree.vala # src/MainWindow.vala
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #851
split-setwith custom delimiters to identify words (do not use textiter functions) see Rework word completion: 3 new parser functions #1526For simplicity, insertions and deletions are all handled the same way rather than separate functions depending on where the insertion/deletion occurred. This results in some temporary "words" being added and removed in quick succession while typing but on current average hardware (i5 processor, SSD) and modest sized files (3000 lines) no performance issues were noticed. However, more efficiency could be achieved at the cost of greater complexity by queueing the changes (like Files) and ignoring those that cancel out.
To be decided:
However this PR is usable as is in my opinion and can refined later.
Based on #1487