onivim / oni

Oni: Modern Modal Editing - powered by Neovim
https://www.onivim.io
MIT License
11.36k stars 300 forks source link

C++ autocompletion inserting indefinitely when used on argument placeholders #2648

Open guhetier opened 5 years ago

guhetier commented 5 years ago

Hello, I got an issue with C++ auto-completion, on a new Oni installation (default configuration). When completing a function name on an argument placeholder (from a previous completion), the auto-completion starts inserting the argument multiple times.

Oni Version: 0.3.6 Neovim Version (Linux only): v0.3.1 Operating System: Linux, Manjaro, i3edition

Issue: When using 'enter' to auto-complete an argument on an argument placeholder (from a previous completion), the auto-completion starts inserting it multiples time, until 'escape' is hit.

Expected behavior: Auto-completion should insert the argument only once

Actual behavior: The argument is inserted infinitely until 'escape' is pressed.

Steps to reproduce:

Position the cursor to the first line of the main in the following code.

#include<algorithm>
using namespace std;
int main() {

    return 0;
}

Type sort and use enter to autocomplete the function. sort(_RAIter, _RAIter, _Compare) appears, with the cursor positioned to replace the first argument. Type sort again and hit enter to autocomplete.

You get:

    sortstable_sort(_RAIter, _RAIter, _Compare)(, _RAIter, _Compare)(, _RAIter, _Compare)(, _RAIter, _Compare)(, _RAIter, _Compare)(, _RAIter, _Compare)...
oni-bot[bot] commented 5 years ago

Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.