Move overwriteBefore/overwriteAfter to ISuggestion

This commit is contained in:
Martin Aeschlimann
2015-12-11 11:18:43 +01:00
parent 661d832744
commit b1ea910757
9 changed files with 45 additions and 38 deletions

View File

@@ -502,12 +502,12 @@ class SuggestAdapter implements modes.ISuggestSupport {
// insert the text of the edit and create a dedicated
// suggestion-container with overwrite[Before|After]
suggestion.codeSnippet = item.textEdit.newText;
suggestion.overwriteBefore = pos.character - editRange.start.character,
suggestion.overwriteAfter = editRange.end.character - pos.character
allSuggestions.push({
currentWord: doc.getText(<any>editRange),
suggestions: [suggestion],
overwriteBefore: pos.character - editRange.start.character,
overwriteAfter: editRange.end.character - pos.character
suggestions: [suggestion]
});
} else {