Fix autocomplete prefix for custom identifierRegexes#4919
Open
AprilArcus wants to merge 1 commit intoajaxorg:masterfrom
Open
Fix autocomplete prefix for custom identifierRegexes#4919AprilArcus wants to merge 1 commit intoajaxorg:masterfrom
AprilArcus wants to merge 1 commit intoajaxorg:masterfrom
Conversation
c266a7b to
fc7659b
Compare
Contributor
|
@nightwing could you please take a look at the PR? |
Contributor
|
@AprilArcus could you please address failing build? Seems it's just related to missing semicolon |
Hi, Ace team! My team has been using a fork of Ace, and I'm hoping to merge some of our changes upstream so that we can return to using your official releases. The engineer who originally accomplished this work has long since departed my team, so forgive me for this somewhat rote transcription of his working notes. > This was sent upstream in ajaxorg#2352, > but closed because ajaxorg@fcebd0f > seemed to address the same issue. That fix unfortunately does not > work as we need, and fails the behavior described in our test named > `test leading @ not duplicated on autocomplete` > > The root cause: Autocomplete prefix can be wrong for completions with > a custom identifierRegex because `Autocompleter.base` is computed > relative to a prefix computed for the default identifierRegex. Below, I reproduce the test my colleague referred to. ``` 'test leading @ not duplicated on autocomplete': function (test) { editor.setValue(''); editor.navigateFileStart(); var text = 'view: users { derived_table: { sql: @{;; } }'; exec('insertstring', 1, text); editor.moveCursorTo(0, 38); editor.getValue(); attachedSymbolsToSession(text, editor.session, { const: 'value' }); editor.execCommand('startAutocomplete'); var completion = editor.completer.completions.filtered.filter(function(completion) { return completion.caption === '@{const}'; }); test.ok(completion[0]); editor.completer.insertMatch(completion[0]); test.equal(editor.getValue(), 'view: users { derived_table: { sql: @{const};; } }'); test.done(); }, ```
fc7659b to
e4e7582
Compare
Author
|
done |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4919 +/- ##
==========================================
+ Coverage 85.75% 85.85% +0.10%
==========================================
Files 539 542 +3
Lines 40728 41138 +410
Branches 6445 6515 +70
==========================================
+ Hits 34927 35320 +393
- Misses 5801 5818 +17
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Author
|
Can anyone help me rebase this over #5084? I'm stumped. |
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.
Hi, Ace team! My team has been using a fork of Ace, and I'm hoping to merge some of our changes upstream so that we can return to using your official releases.
The engineer who originally accomplished this work has long since departed my team, so forgive me for this somewhat rote transcription of his working notes.
Below, I reproduce the test my colleague referred to.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.