Sublime Forum

Toggle Comment broken for SQL files after upgrade to ST3 Build 3103

#1

In ST3 Build 3083 (Windows 7 Pro), this issue did not occur. However, after the upgrade to Build 3103, both Toggle Comment and Toggle Block Comment are broken for files that use the SQL syntax (i.e. nothing happens when attempting to toggle comments, in either direction), although the syntax highlighting itself is still present. This issue exists regardless of whether the menu options or the shortcut keys are used. I have not modified any key bindings for this functionality.

Other syntax definitions I have tested are unaffected, e.g. C#, HTML, Perl, Python, Javascript, Markdown, Powershell, Ruby, and XML.

With command logging enabled (by entering “sublime.log_commands(True)” in the console), invoking the Toggle Comment or Toggle Block Comment option (either via menu or shortcut key) results only in one of the following lines being output to the console, depending on which option is invoked:
command: toggle_comment {“block”: false}
command: toggle_comment {“block”: true}

Any help would be very much appreciated.

0 Likes

#2

Works for me (3102).

0 Likes

#3

Do you happen to be using ImprovedSql package, because with that package enabled I too experience the same behavior

0 Likes

#4

You can try to type the command below after opening a SQL file:

>>> view.meta_info("shellVariables", 0)
[{'name': 'TM_COMMENT_END_2', 'value': '*/'}, {'name': 'TM_COMMENT_START', 'value': '-- '}, {'name': 'TM_COMMENT_START_2', 'value': '/*'}]
1 Like

#5

@bizoo: For an SQL file, that command returns only a pair of empty square brackets: []

For any other file, it returns a result similar to that which you posted, e.g. for an HTML file it returns the following:
[{'name': 'TM_COMMENT_END', 'value': ' -->'}, {'name': 'TM_COMMENT_START', 'value': '<!-- '}]

@capnhud: No, I am not using the ImprovedSql package. My current list of installed .sublime-package files is as follows:
0_package_control_loader
ColorPicker
Indent XML
jQuery
jQueryDocs
LoremIpsum
MarkdownEditing
Nodejs
npm
Package Control
PackageResourceViewer
PowerShell
Tabright
Theme - Soda
Toggle Read-Only
VBDotNet
VBScript
Visual Studio Dark
WordCount

0 Likes

#6

I’m pretty sure you’ve already checked this, but the two things I would look for are:

  1. Is the SQL syntax selected
  2. Is there a file named SQL.tmLanguage or SQL.sublime-syntax in your Packages folder (Preferences > Browse Packages…)?

I can confirm the toggle is working properly for me 3102.

0 Likes

#7

@wbond: Yes to both.

However, the issue seems to be resolved. I disabled all of the above-listed packages by adding them to the “ignored_packages” list, which fixed the issue. I then re-enabled the packages one by one, and even after all of the packages were re-enabled, the issue still was not present. Also, the “view.meta_info” command now returns the expected results.

Thanks everyone for your help.

0 Likes