SlickEdit Community
Archived Beta Discussions => SlickEdit 201x Beta Discussions => SlickEdit 2017 v22 Beta Discussion => Topic started by: rowbearto on August 08, 2017, 05:29:14 PM
-
Attached is a sample project.
Follow the instructions in the comments to see SE insert an 'a' character after the '<':
#include <iostream>
int main(int argc, char **argv)
{
// Put cursor just after the t in std::cout
// press <space> then a single '<' character
// SE inserts an 'a' character after the <
// such as: std::cout <a
// If you don't see it right away, try closing/re-opening SE a few times
// If you do this with an empty config, after pressing the <, then it tags gcc
// after tagging is completed, backspace to after the 't', then do:
// "space""<", and you will
// see the <a
// Often when I type the second < and then space, I end up with:
// std::cout <<a
// but it doesn't seem to happen in this small test project.
// This issue occurs in SE 21.0.3 also
std::cout
// This is what I see after typing ' <'
// std::cout <a;
return 0;
}
-
Still see this issue in Beta 2.
-
I found that this issue is not reproduced with default configuration, however it can be reproduced by using my configuration and doing a few things after applying my configuration.
So I uploaded my configuration to support.slickedit.com under "extra_a". I tarballed my 22.0.0 directory as I found I could not reproduce by export/import.
After extracting the 22.0.0 directory, put the cursor after the "t" in "std::cout" and enter "<space>" then "<", then SE will insert an extra "a" character. If you do not see the "a" right away, then you need to toggle between different formatting modes:
Document->C/C++ Options->Formatting, change "Profile" from "2 space indent" to "3 space indent"
Then try again.
If not reproduced, change back from "3 space indent" to "2 space indent", toggle one or 2 more times, eventually the issue starts happening.
You can also try it with the Virtual machine that I uploaded in: https://community.slickedit.com/index.php/topic,15458.msg58927.html#msg58927
-
Reproduced using your config. I'll see what can be done.
"<" is triggering auto-function-help, that's why the GNU tag file is built, it has to try to figure out what "std:: cout" is, since it could be a template type with arguments. One could argue that the editor should just know that for C++, but we don't hard code stuff.
-
Good news. It also happens when I stream into other things besides cout, that was just an example. So hardcoding cout wouldn't handle all cases anyway.
-
This will be fixed in the next drop.
The problem was related to "auto-insert matching parameter" being too aggressive for template argument lists. As a workaround, you can turn off the option for C++. Document > C/C++ Options... > Context Tagging
-
Thanks Dennis!