Author Topic: When selecting suggested function, its argument is expanded, not selected  (Read 768 times)

b

  • Senior Community Member
  • Posts: 284
  • Hero Points: 25
In an earlier bug reported, an argument to a function was expanded, but not left selected to allow typing in the desired value.   This was fixed in the specific case desired, but I've discovered a variant of the problem in beta6.

I have a function called ToBin() that takes a single argument n.

If I type ToBin(   it will close the paren and suggest n and properly leave it selected such that when I type it is replaced with the new argument as desired.

However, if I type To   and wait, it will suggest ToBin.   If I scroll down the selections and accept this, it will expand ToBin(n but then leave n as the argument, unselected such that I have to delete the argument before typing my own.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2747
  • Hero Points: 420
I am having trouble reproducing this.  This could be a language specific problem.  What language did you see this in?  Could you provide a short code sample where I can reproduce this?  Does this happen in a default configuration also?

When you scroll down and accept "ToBin" as an argument, how are you doing that, there are numerous ways to accept a completion (TAB, ENTER, typing open paren, double-clicking on it with the mouse, ...).  Also, what sort of a completion is it at that time?  (Current Context, Symbol, Word completion)?  Is function-argument help active at the time?

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2747
  • Hero Points: 420
Never mind, Clark pointed out how he was able to reproduce it.

b

  • Senior Community Member
  • Posts: 284
  • Hero Points: 25
C++ (MSVC)
Ah, I see that if I <TAB> it works correctly, I had been pressing <ENTER> and reproducing this issue.   I wasn't using the mouse, but the cursor keys in the drop down.

b

  • Senior Community Member
  • Posts: 284
  • Hero Points: 25
ah, okay.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2747
  • Hero Points: 420
Fixed for rc1.

arog

  • Community Member
  • Posts: 19
  • Hero Points: 3
I have a similar issue, using arrow keys to highlight a function (under Symbols) and then hitting enter or tab to select it.  However, instead of not highlighting the argument correctly, the cursor jumps to the end of the buffer.  Will your fix probably take care of this issue also?

This snippet exhibits the behavior for me, if I attempt to finish the this.T line by selecting TestFunction from the Symbols list.

Code: [Select]
public class Test
{
public TestFunction(int y)
{
int z = 1;

// try to complete this expansion with TestFunction
this.T
}
}

C# macOS beta6

Thanks!

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2747
  • Hero Points: 420
@arog:  Could you send your user.cfg.xml

arog

  • Community Member
  • Posts: 19
  • Hero Points: 3
Following up to say that my case was also fixed in RC1.  I've been using it all day without any issues so far.  Thanks!