Skip to content

Commit 2feab1e

Browse files
committed
Fix code completion with Qt Creator 18
The bad behavior is visible in the recording at https:// bugreports.qt.io/browse/QTCREATORBUG-33716
1 parent a72ba78 commit 2feab1e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llamaplugin.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -819,8 +819,8 @@ void LlamaPlugin::fim_render(TextEditorWidget *editor,
819819
can_accept = false;
820820

821821
if (can_accept) {
822-
// Text:positionInText has 1 based line and column values
823-
int currentIntPos = Text::positionInText(editor->document(), pos_y, pos_x + 1);
822+
// Text:positionInText has 1 based line and 0 based column values
823+
int currentIntPos = Text::positionInText(editor->document(), pos_y, pos_x);
824824
TextSuggestion::Data data;
825825
Text::Position currentPos = Text::Position::fromPositionInDocument(editor->document(),
826826
currentIntPos);

0 commit comments

Comments
 (0)