Skip to content

Commit

Permalink
Backport PR jupyterlab#16298: Allow to invoke inline completer anywhe…
Browse files Browse the repository at this point in the history
…re (not only at the end of line)
  • Loading branch information
ajbozarth authored and meeseeksmachine committed May 8, 2024
1 parent 94e8eaf commit f9bd208
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/completer/src/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,10 @@ export class CompletionHandler implements IDisposable {
}

const line = editor.getLine(position.line);
if (typeof line === 'undefined' || position.column < line.length) {
if (
trigger === InlineCompletionTriggerKind.Automatic &&
(typeof line === 'undefined' || position.column < line.length)
) {
// only auto-trigger on end of line
return;
}
Expand Down

0 comments on commit f9bd208

Please sign in to comment.