Skip to content

Commit 1767a93

Browse files
committed
Fix Tab full completion
In the effort of supporting Shfit-Tab line completion, the full tab completion got broken. The former is more important for now.
1 parent 184e143 commit 1767a93

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

llamaplugin.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,11 +635,18 @@ void LlamaPlugin::fim_render(TextEditorWidget *editor,
635635
data.range.end = currentPos;
636636
data.position = currentPos;
637637

638+
/*
639+
// This works for Shift-Tab, but copies prefix when using Tab
638640
data.range.begin.column -= pos_x;
639641
int separator = content_str.indexOf("\n");
640642
data.range.end.column = pos_x
641643
+ (separator != -1 ? content_str.size() - separator - 1
642644
: content_str.size());
645+
*/
646+
647+
int separator = content_str.indexOf("\n");
648+
data.range.end.column = separator != -1 ? content_str.size() - separator - 1
649+
: content_str.size();
643650

644651
// Workaround for QTCREATORBUG-33303
645652
data.position.column -= pos_x;

0 commit comments

Comments
 (0)