Possible bug in auto_complete_insert signal

Post your questions and problem reports here

Moderator: kfury77

Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.

  • Check the Support section of the corresponding product first. Chances are you will find your answer there;
  • Do not create new topics for already reported problems. Add your comments to the existing topics instead;
  • Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
  • Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
  • Include the version number of the software you are using;
  • This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;

Possible bug in auto_complete_insert signal

Postby pmk65 » Fri May 25, 2018 5:03 pm

Im using the new "auto_complete_insert" signal in a new plugin, but Im experiencing different values depending on if the trigger keyword is enclosed in quotes or not.

Example 1:
Code: Select all
    <script type="text/javascript" src="jqu"></script>


Placing the cursor after the word jqu and activating the Autocompleter gives this result:

ListItemAtCursorAC: jqu
ACWordStart: 102
ACWordLength: 5
ACLineOffset: 0

The ACWordStart is the position occupied by the starting quote.
ACWordLength is the length of ListItemAtCursorAC + 2 (the start/ending quote)

Example 2:
Code: Select all
    <script type="text/javascript" src=jqu></script>


Placing the cursor after the word jqu and activating the Autocompleter gives this result:
ListItemAtCursorAC: jqu
ACWordStart: 212
ACWordLength: 0
ACLineOffset: 0

Here the ACWordStart is the start of the jqu word, but ACWordLength is zero!
There are 10 types of people in the world: Those who understand binary and those who don't.
User avatar
pmk65
 
Posts: 552
Joined: Sun Dec 20, 2009 9:58 pm
Location: Copenhagen, Denmark

Re: Possible bug in auto_complete_insert signal

Postby Aivars » Fri Jun 01, 2018 10:32 am

I'll check it out, but that's basically the same that the internal auto-complete engine receives, so I can only assume there is some extra handling for unquoted attribute values afterwards. I don't know why word length is zero, it doesn't make much sense, but there might be a reason for this, even if it doesn't make sense for plugin scripting or, as is the case, hinders it.
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 2254
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia


Return to HTMLPad / Rapid CSS / Rapid PHP / WeBuilder Support

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 2 guests

cron