Skip to content

Commit

Permalink
your next input will be used as manual completion
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Aug 5, 2023
1 parent 298f95a commit 8b54e33
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 3 additions & 3 deletions denops/ddc/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,14 +237,14 @@ export function main(denops: Denops) {
visible && ddc.prevUi !== "" &&
options.autoCompleteEvents.indexOf(event) > 0
) {
// NOTE: If UI is visible, use prevSources/prevUi/prevEvent instead to
// update current items
// NOTE: If UI is visible, use prevSources/prevUi/prevEvent to update
// current items

options.sources = ddc.prevSources;
options.ui = ddc.prevUi;

if (ddc.prevEvent === "Manual") {
// Overwrite event if manaul completion
// Overwrite event if manual completion
context.event = ddc.prevEvent;
}
}
Expand Down
5 changes: 4 additions & 1 deletion denops/ddc/ddc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,10 @@ export class Ddc {
return true;
}

if (options.autoCompleteEvents.indexOf(context.event) < 0) {
if (
context.event !== "Manual" &&
options.autoCompleteEvents.indexOf(context.event) < 0
) {
return true;
}

Expand Down
3 changes: 3 additions & 0 deletions doc/ddc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,9 @@ ddc#map#manual_complete([{options}])
{options} is |ddc-options|.
NOTE: Manual completion ignores
|ddc-source-option-minAutoCompleteLength|.
NOTE: After you open completion UI in manual completion, your
next input will be used as manual completion until the items
are empty or |ddc#hide()| is called.

------------------------------------------------------------------------------
EVENTS *ddc-events*
Expand Down

0 comments on commit 8b54e33

Please sign in to comment.