Misplaced caret on double click in function list in UE 22.20.0.34 (fixed with Perl regex)

Misplaced caret on double click in function list in UE 22.20.0.34 (fixed with Perl regex)

9
NewbieNewbie
9

    Oct 09, 2015#1

    Just downloaded and installed UE 22.20.0.34. Trying it out, noticed this:
    If I, in the function list, double click a function, the cursor does not jump to the functions first line.
    The cursor will instead be positioned in the vicinity of the functions first line, but never exactly on it.
    Sometimes the cursor will even be positioned outside of the target function.
    Anyone else seen this?

    6,603548
    Grand MasterGrand Master
    6,603548

      Oct 10, 2015#2

      We need more information to help on this issue:
      1. Which syntax highlighting is active?
        This information is displayed in status bar at bottom of UltraEdit main window in field left to last modification date of active file.
      2. What are the regular expressions defined in the syntax highlighting file used for active file which are used to find the strings for the function list?
        Open Advanced - Configuration - Editor Display - Syntax Highlighting, click on button Open right of the already selected wordfile used for active file and close configuration dialog with button Cancel. Copy and paste all lines from top of file starting with /Function String or the block starting with first /TGBegin and ending with last /TGEnd into your next post.
      3. What is the encoding of the file (ANSI/UTF-8/UTF-16) and the type of line termination (DOS/UNIX/MAC)?
        Encoding and line termination type for active file are both displayed also in status bar at bottom.
      4. Please post a block from active file where positioning the caret on double click in function list is not correct. But verify first if positioning is also not working when this block only is stored in a new file of same type (file extension, encoding, line termination type) after 3 empty lines.
      Best regards from an UC/UE/UES for Windows user from Austria

      9
      NewbieNewbie
      9

        Oct 10, 2015#3

        Hi Mofi!

        Thanks for your response. I have attached a zip with the relevant files. I will answer your 4 points, in brief:
        1. The wordfile is the attached RapidHMv21.uew. For the ABB industrial robot programming language Rapid. The wordfile is a bit of a homebrew, but has served me very well for many years. Up till now.
        2. Please see the wordfile attached (removed, getter better one below).
        3. Line terminations DOS. Encoding 1252 (ANSI - Latin I). Please check out the attached target file LTool.mod (also removed).
        4. See picture below.
        Misplaced caret.png (39.8KiB)

        6,603548
        Grand MasterGrand Master
        6,603548

          Oct 10, 2015#4

          The UltraEdit regular expressions for the function list are really not good in your wordfile. %+ is invalid as a multiplier on non matching anchor for start of line is in any regex engine invalid. [^{ ^}^{LOCAL ^}]+ looks like an OR expression inside a character set definition. That's also not valid and is interpreted completely different than what was the intention.

          But you are nevertheless right with what you observed. UltraEdit does not produce the correct output in function list and misplaces the caret on double click even when using valid UltraEdit regular expression search strings. I will analyze that more deeply and report it to IDM support by email.

          In the meantime I made a very quick look on RAPID Overview On-line PDF file and reworked your wordfile using Perl regular expressions for the function strings. Those work much better. I created 6 different variations. See the attached ZIP file containing also a readme.txt file with more details.

          This first version of the wordfiles was deleted after post below.
          Best regards from an UC/UE/UES for Windows user from Austria

          9
          NewbieNewbie
          9

            Oct 11, 2015#5

            Thanks a lot Mofi.

            The Rapid manual you found is quite old, from the mid 1990's. The basic structure of the language has not changed much. But identifiers can now have up to 32 characters. I can easily adapt for this in your wordfiles.

            But another thing I am not able to fix:
            The syntax for a Function declaration is FUNC datatype name.

            6,603548
            Grand MasterGrand Master
            6,603548

              Oct 11, 2015#6

              Okay! It was no problem for me to update the Perl regular expressions in the 6 wordfiles to include datatype on FUNC only and getting the datatype also listed in the function list. See the wordfiles in attached second ZIP file.

              By the way: Wordfile 3 and 6 were not working good before at all detected by me on analyzing the issues more deeply for the report I have sent already to IDM support. This second ZIP file contains now really working expressions in wordfile 3 and 6. (Function list looked right with previous wordfile 3 and 6, but caret positioning did not work. This was included in the report, too.)
              RapidHMv21_Wordfiles2.zip (12.3 KiB)   106
              This ZIP file contains the updated wordfiles for Rapid.
              Best regards from an UC/UE/UES for Windows user from Austria

              9
              NewbieNewbie
              9

                Oct 12, 2015#7

                Yes, your latest wordfile no. 6 works exactly as I want, including caret positioning.
                Many thanks!