Add multicursor autocompletions - #4028
Conversation
|
But we already have #3442 and this use case is discussed within it?! |
|
Yes, but #3442 still autocompletes on all cursors, even if they shouldn't be. |
|
Tested the changes, works well as expected. Nice one. |
|
Hey @redsti-github , I want to merge this to my own fork. Could you tidy up the commits please? Thanks. |
325e85c to
5c71c2e
Compare
5c71c2e to
5b66d78
Compare
| } | ||
|
|
||
| c := b.GetActiveCursor() | ||
| // cycle autocomplete for all except active cursors |
There was a problem hiding this comment.
This comment is not true anymore?
| c := b.GetActiveCursor() | ||
| // cycle autocomplete for all except active cursors | ||
| activeWord, _ := b.GetWord() | ||
| activeWord = bytes.Clone(activeWord) |
There was a problem hiding this comment.
Apparently bytes.Clone() was added in Go 1.20, while micro claims to support 1.19.
Maybe we should just bump the minimum required version to 1.20? @JoeKar WDYT?
Implements autocomplete while using multiple cursors. (loosely based on #3442)
Only autocompletes cursors which end in the same word as the active cursor.
For example:
Closes #3442