Skip to content

Commit e83887f

Browse files
committed
Merge pull request #569 from gregerolsson/master
Conserves padding during autocomple in JSX
2 parents e0e603e + b85ad62 commit e83887f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dist/main/atom/autoCompleteProvider.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ exports.provider = {
5151
var suggestionText = relativePath;
5252
var suggestion = {
5353
text: suggestionText,
54-
replacementPrefix: resp.endsInPunctuation ? '' : options.prefix,
54+
replacementPrefix: resp.endsInPunctuation ? '' : options.prefix.trim(),
5555
rightLabelHTML: '<span>' + file.name + '</span>',
5656
type: 'path'
5757
};
@@ -107,7 +107,7 @@ exports.provider = {
107107
}
108108
return {
109109
text: c.name,
110-
replacementPrefix: resp.endsInPunctuation ? '' : prefix,
110+
replacementPrefix: resp.endsInPunctuation ? '' : prefix.trim(),
111111
rightLabel: c.display,
112112
leftLabel: c.kind,
113113
type: atomUtils.kindToType(c.kind),

lib/main/atom/autoCompleteProvider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export var provider: autocompleteplus.Provider = {
141141

142142
var suggestion: autocompleteplus.Suggestion = {
143143
text: suggestionText,
144-
replacementPrefix: resp.endsInPunctuation ? '' : options.prefix,
144+
replacementPrefix: resp.endsInPunctuation ? '' : options.prefix.trim(),
145145
rightLabelHTML: '<span>' + file.name + '</span>',
146146
type: 'path'
147147
};
@@ -215,7 +215,7 @@ export var provider: autocompleteplus.Provider = {
215215

216216
return {
217217
text: c.name,
218-
replacementPrefix: resp.endsInPunctuation ? '' : prefix,
218+
replacementPrefix: resp.endsInPunctuation ? '' : prefix.trim(),
219219
rightLabel: c.display,
220220
leftLabel: c.kind,
221221
type: atomUtils.kindToType(c.kind),

0 commit comments

Comments
 (0)