Recent

Author Topic: Show suggestions when typing?  (Read 4840 times)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10696
  • Debugger - SynEdit - and more
    • wiki
Re: Show suggestions when typing?
« Reply #15 on: September 12, 2023, 04:09:30 pm »
Quote
=> whatever partial identifier you have just typed, even if that does not yet exist anywhere else in the source, show that on top (so that when you press space, you always get what you have typed, and never some other completion.
No, I meant existing identifiers of course
It does not make sense to suggest non-existent items

Then I am at loss what you mean.
As I understand it, it already works that way.

I have my completion list sorted "Alphabetic (Scoped)". So when I complete in the below
Code: Pascal  [Select][+][-]
  1. program Project1;
  2. var FooBar: integer;
  3. procedure p1;
  4. var
  5.   FooBarLocal: integer;
  6. begin
  7.   Fooba   // Completing here
  8. end;
  9.  
  10. begin
  11. end.
  12.  
The list shows (locals before globals)
Code: Text  [Select][+][-]
  1. FooBarLocal
  2. FooBar

But as soon as I type the missing "r" my "currently typed identifier" will be "FooBar"
Quote
2. currently typed identifier should always be first in the list, i.e. if I type `to` then it should be the first in the list, not `TObject`

"FooBar" exists, and the entry for the existing  "FooBar" is the first in the list.


Of course that only works, if the word is in the list.

You are testing with the keyword "to", which in your case is (due to a different bug) not in the list. If it isn't in the list, it can't be on top of the list.

But the question is, if "for any word that is in the list" the "current" is not shown on top?

 

TinyPortal © 2005-2018