Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-23374

Highlighting broken in JS editor

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • None
    • Qt Creator 4.10.0, Qt Creator 4.11.0
    • Quick / QML Support
    • None
    • Windows

    Description

      Hello,

      I'm facing a strange issue where some valid JS code (properly running) has its JS highlighting broken for around 90% of the length of the file.

      I tried to isolate a sample of code that gave this issue (that will not run but that shows the issue), that you can find in the attachments.

      Multiple unrelated changes in the code can make the colors back for this sample:

      • Removing "var mapObj = this" in the top of the JS file
      • Adding an "s" to "var currentPos" at line 29 so it becomes "currentPoss"
      • Changing the call of caseAt() line 30 to have only one argument
      • Removing one of the last functions

      Please note that the runnables.create(...).then(...) is a custom implementation of JS Promises for Qt that I wrote, and that works the way it is written so I don't think there is any syntax issue.

      I noted that sometimes with Qt Creator 4.10 (I did not try yet with version 4.11), typing letters in the broken part can make the highlighting "blink", like for a fraction of second it will be back and then it turns off again.

      It really does not make sense to me, and can be very bothersome because most of the highlighting of my JS files is broken.

      This issue is there since a few versions, it is not specific to Qt Creator 4.11. It does not come back when restarting Qt Creator.

      Thanks,
      Louis

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              Unassigned Unassigned
              amnell Louis du Verdier
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes