naomi
naomi copied to clipboard
Single-line commenting shifts line indent
Description
A code line is shifting while toggling comments by a shortcut. See gif: https://ibb.co/9ZGvWPj However the toggling by the dropdown from the main menu works fine.
Steps to reproduce
- Create empty JS file
- Type something in any line
- Toggle twice comment by a shortcut
- The line is shifted by a space
Expected behavior
There should be no indents after the toggling single-line comments via a shortcut.
Actual behavior
The line I try to twice toggle comment for is shifted by a space. While a shortcut console shows the following only.
command: naomi_toggle_jsx_comment {"block": false}
command: naomi_toggle_jsx_comment {"block": false}
The menu usage causes console to show this:
command: toggle_comment {"block": false}
command: toggle_comment {"block": false}
Environment
- ST3 Build: 3211
- Naomi: v4.3.2
- Operating system and version: macOS 10.14.5
I got around this by copying Sublimes default toggle_comment command over to my user pref key-bindings
{ "keys": ["super+forward_slash"], "command": "toggle_comment", "args": { "block": false } }
The above fix also worked for me! Albeit switching super+forward_slash
to ctrl+forward_slash
for Windows behavior. Thanks!