Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SC-IDE: minor detail: add space after colon in autocompletion of method calls #831

Closed
telephon opened this issue Apr 27, 2013 · 2 comments
Closed
Labels
enhancement env: SCIDE good first issue indicates issue tickets that are suitable for a new contributor
Milestone

Comments

@telephon
Copy link
Member

When adding keywords in autocompleting method- and function calls, a space between the colon and the insertion point would be good style.

Example:

Pbind(\freq, 460).play(quant:1);

Pbind(\freq, 460).play(quant: 1);

@scztt scztt added the good first issue indicates issue tickets that are suitable for a new contributor label Mar 22, 2015
@scztt scztt modified the milestone: future Apr 18, 2015
@patrickdupuis
Copy link
Contributor

We need to add a space after the colon in line 1125 of autocompleter.cpp

text.append(": ");

However, this causes the cursor to move further to the right every time you press TAB to cycle through the arg names. I'm not sure what the correct fix is. Maybe we need to use text.lenght instead of argNameToken->length on line 1131?

cursor.setPosition(pos + text.lenght, QTextCursor::KeepAnchor);

@telephon
Copy link
Member Author

telephon commented May 16, 2016

Maybe move the cursor forward not when the TAB is cycled, but when the next key is pressed? You may need to keep a flag around for that like insertSpace = true.

In other words, don't append : + SPACE and then char, but : and then SPACE + char

@mossheim mossheim changed the title minor detail: add space after colon in autocompletion of method calls SC-IDE: minor detail: add space after colon in autocompletion of method calls Jan 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement env: SCIDE good first issue indicates issue tickets that are suitable for a new contributor
Projects
No open projects
Development

No branches or pull requests

3 participants