Skip to content

Commit

Permalink
Fix getWord()
Browse files Browse the repository at this point in the history
  • Loading branch information
uga-rosa committed Jul 1, 2023
1 parent cc34076 commit 47ceaab
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions denops/ddc-source-nvim-lsp/completion_item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,7 @@ export default class CompletionItem {
private getWord(
lspItem: LSP.CompletionItem,
): string {
if (!lspItem.filterText) {
return lspItem.label;
}
const text = lspItem.filterText.trim();
const text = (lspItem.filterText ?? lspItem.label).trim();
const defaultOffset = this.#suggestCharacter;
let offset = this.getOffset(lspItem, defaultOffset);
if (offset < defaultOffset) {
Expand Down

0 comments on commit 47ceaab

Please sign in to comment.