Jump to content

BETA: SciTE v5x & lua Dynamic_include and "Smart" AutoComplete for Vars/UDFs/Abbrevs


Recommended Posts

Posted (edited)

I can crash SciTE

here is repro:

Func _123456789_1x23456789_2x23456789_3x23456789_4x23456789_5x23456789_6x23456789_7x23456789_8x23456789()
EndFunc

just try to add 0 after _8x23456789

Edited by mLipok
better repro

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

Can you somehow stripp max length of displayed item in pop up list to 200 chars ?

image.thumb.png.154aa2b8bca141414ad787bc223f4e71.png

Func _123456789_1x23456789_2x23456789_3x23456789_4x23456789_5x23456789_6x23456789_7x23456789_8x23456789()
    $123456789_1x23456789_2x23456789_3x23456789_4x23456789_5x23456789_6x23456789_7x23456789_8x23456789_9x23456789_10x456789_11x456789_12x456789_13x456789_14x456789_15x456789_16x456789_17x456789_18x456789_19x456789
    $123
EndFunc

I have 1920x1080 screen and as you can see in this following screenshot, in case of longer element, you can see issue like showing the POPUP list on second monitor.

image.thumb.png.2473fd34f54b37d0402144eee08577d1.png

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

  • Developers
Posted
  On 8/22/2022 at 10:36 PM, mLipok said:

I can crash SciTE

here is repro:

Func _123456789_1x23456789_2x23456789_3x23456789_4x23456789_5x23456789_6x23456789_7x23456789_8x23456789()
EndFunc

just try to add 0 after _8x23456789

Expand  

The ""assumption in the SciTE lexer is that no language will ever use a keyword longer than 99 characters, which has proven to be pretty save in that last 15 year until "somebody" comes along that likes to do crazy stuff like coming up with a Func name (Keyword) that is longer than that ... hence the crash. ;)

I will add an extra test to avoid the crash and change the type to DEFAULT for this longer keyword, and please do not ask why a FUnc name longer than 99 doesn't color properly. :lol:

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

  • Developers
Posted
  On 8/22/2022 at 10:53 PM, mLipok said:

Can you somehow stripp max length of displayed item in pop up list to 200 chars ?

Expand  

I really think you should stick to real-life examples and not try to find the extremes.
If you code a BAD-ASS-BIG_Variable name then that is what you will get. ;)  

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted
  On 8/23/2022 at 11:09 AM, Jos said:

If you code a BAD-ASS-BIG_Variable name then that is what you will get.

Expand  

It was related to abbreviation which are longer than 200 chars, just when you type any single letter    for example letter     a    it popup such big list.

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

  • Developers
Posted (edited)
  On 8/23/2022 at 11:11 AM, mLipok said:

It was related to abbreviation which are longer than 200 chars, just when you type any single letter    for example letter     a    it popup such big list.

 

Expand  

Ah  ok ....  the first image was readable for me and showed something else. I have no issue limiting the Abbrev string length in the dropdown. 

PS: I have fixed the lexer hardcrash and will upload the lexer update later today

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted (edited)
  On 8/23/2022 at 11:01 AM, Jos said:

The ""assumption in the SciTE lexer is that no language will ever use a keyword longer than 99 characters, which has proven to be pretty save in that last 15 year until "somebody" comes along that likes to do crazy stuff like coming up with a Func name (Keyword) that is longer than that ... hence the crash. ;)

I will add an extra test to avoid the crash and change the type to DEFAULT for this longer keyword, and please do not ask why a FUnc name longer than 99 doesn't color properly. :lol:

Expand  

I was just trying to check how long text is displayed ;)

To find out this:

  On 8/23/2022 at 11:11 AM, mLipok said:

It was related to abbreviation which are longer than 200 chars, just when you type any single letter    for example letter     a    it popup such big list.

Expand  

And as I find that it crashes SciTE I noted it here.

btw.
I use long names constantly:

_WEBEWID__WD__P*****K********__O****F*******__IMIE_S**
_WEBEWID__WD__P*****K********__O****F*******__DRUGIE_IMIE_S**
_WEBEWID__WD__P*****K********__O****F*******__IMIE_MATKI_S**
_WEBEWID__WD__P*****K********__O****F*******__IMIE_OJCA_S**
_WEBEWID__WD__R*******W*********_G**R******
_WEBEWID__WD__R*******W*********_G**R******_C**C*****S*********R*****
_WEBEWID__WD__R*******W*********_G**R******_P******T*****W******_A*PDF

or like this:

_CEiDG__WD__WynikiWyszukiwania__GetAllResults
_CEiDG__WD__WynikiWyszukiwania__GetAllResults
_CEiDG__WD__WynikiWyszukiwania__GetPage_AsPDF
_CEiDG__WD__WynikiWyszukiwania__Paginator_GetCurrentPage
_CEiDG__WD__WynikiWyszukiwania__Paginator__Nastepna_Click

Because I know exactly where and what these functions do.


EDIT: This is like reading code without reading comments.

Edited by mLipok
some code was modified by replacing with *

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

  • Developers
Posted (edited)

Like I said...   The Lexer will try to check for Keywords when it is still in a default style, and any unknown long string longer than 99 will make it crash for you. Strings comments etc aren't an issue.   

Just uploaded the complete set to the alpha directory. Download SciTE.exe + 2 DLL's to get the fix.

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

  • Developers
Posted
  On 8/23/2022 at 11:18 AM, Jos said:

Ah  ok ....  the first image was readable for me and showed something else. I have no issue limiting the Abbrev string length in the dropdown. 

Expand  

I have changed it in this way: Max displayed length 150 and when longer it will be followed with "..." to indicate there is more:image.thumb.png.e9a4d95c853a7b51e5c2934945bfd962.png

Upload will follow later...

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted (edited)

Jos, 

I am not sure if it was discussed But I would like that the proposal are sort By the first Letter followed by AutoComplete and/or the abbrev one

In Scite.4

Scite.4.png.a6b71384502ddf6041c7a6d1f5b6c5a6.png

 

Scite.5 (22/08)

508760867_Scite.5Autocomplete.png.da1a4b1acd74b1f5af1ee4f6115b3333.png

Cheers

PS not sure why the proposal windows is so big

Edited by jpm
  • Developers
Posted
  On 8/23/2022 at 3:50 PM, jpm said:

PS not sure why the proposal windows is so big

Expand  

That has to do with the previous few posts! ;)

I am not sure I understand your proposal, as the shown abbreviations starting with "lb" are alphabetically in the correct place before the "Lo"  ?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

  • Moderators
Posted

Hiya,

I am a bit behind in where we are in this saga at the moment - where can I get the latest files, please, so I can join in the fun too.

Steve G

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

  • Developers
Posted

They are all in the zip linked on the first page:  

  On 7/1/2022 at 2:30 PM, Jos said:

This SciTE_changes_Dynamic_Includes.zip contains the updated files for an standard installation, so just save your current setup and replace the supplied files in the zip file.

Expand  

:) 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

  • Moderators
Posted

Gracias!

Steve G

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted
  On 8/23/2022 at 4:02 PM, Jos said:

That has to do with the previous few posts! ;)

I am not sure I understand your proposal, as the shown abbreviations starting with "lb" are alphabetically in the correct place before the "Lo"  ?

Expand  

When I type l I want "Local" be first before abbrev.

I understand that more autocomplete stuff can be added

If i type "g" I want Global first I dont like _GUI* be listed before GUICreate()

perhaps the best is to list the keyword first follow by the abbrev and after all other matching ordered by name 

I Hope that clarify why it is good for me ...

Cheers

  • Developers
Posted (edited)
  On 8/23/2022 at 6:31 PM, jpm said:

When I type l I want "Local" be first before abbrev.

Expand  

When you type local, then local will be the first one in the list, so I still fail to understand what you think the logic should be as far as sorting is concerned. The current logic is described in the initial post and would like to hear what it should be in case there is a better way:

  Quote

AutoComplete is now customized and will contain the following in the dropdownlist:

  • When starting with $: Any variable that have a partial match anywhere in the name, sorted on the Starting position of the match in the found Variable name and then Alphabetically.
  • When starting with _ or any word-character:  Any internal Keyword/Function or any UDF/Abbreviation that have a partial match anywhere in the name, sorted on the Starting position of the match in the found Variable name and then Alphabetically.
Expand  

Just stating you want something at the top of the list doesn't tell me what logic should be used. ;) 

Just as en example for your Local: these are the dropdown list steps shown after each character typed:

image.png.734217e96e37b9a1096451e7f62203be.png

image.png.e649f091e47e3581115f78693e31d841.png

... and that to me makes perfect sense from a alphabetic sorting point of view. :) 
Anyways, I hope you understand how it works at this moment and am curious how things should/could be different/better. 

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

  • Developers
Posted
  On 8/23/2022 at 11:24 PM, jpm said:

I agree if I type "lo" I get it but What I propose will allow just "l" as before

Expand  

I understand, but "before" there were no ABBREVs, so now they show now as well.  I have no issue added another parameter were you can disable the listing of ABBREVS in the AutoComplete, but other than that have still no idea what it is that you think needs to be change from a Logic point of view. ;) 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted

I just whant to see the order change so that keyword appear abbrev 

not sure partial match should be in the list or a least after the others

  • 5 weeks later...
Posted (edited)

Finally I starts using this in version my DEV ENV
Give me a week for finall testing.

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...