Comments (6)
The problem seems to be with using an opening parenthesis on the continuation line?
DllCall(() ;no indent
DllCall(
() ;continuation line indented
DllCall(()) ;no indent
DllCall(
()) ;continuation line indented
will format as
DllCall(() ;no indent
DllCall(
() ;continuation line indented
DllCall(()) ;no indent
DllCall(
()) ;continuation line indented
If you make this a single line without a continuation, indentation doesn't occur to the rest of the code beneath it.
It's this opening parenthesis after the continuation that causes the problem StrLen(
.
TaskName := "[RunAsTask] " A_ScriptName " @" SubStr( "000000000" DllCall( "NTDLL\RtlComputeCrc32", "Int",0, "WStr",CmdLine, "UInt",StrLen( CmdLine ) * 2, "UInt" ), -9 )
from ahkpp.
Cool. This is a big snippet though, and it took some time to narrow down the issue. For future reference, please use the formatting bug template with small snippets so they're easier to diagnose. Something like
foo(
(bar))
x := 1
as the unformatted input snippet would suffice.
from ahkpp.
Apologies for introducing this bug, I should've tested the newly-added functionality more comprehensively. Pushing a hotfix now, thanks for the prompt report
from ahkpp.
@fade2gray although your workaround is correct, such a long line of code is usually undesirable. I originally wrote my code with a specific format in mind:
foo(
bar,
baz,
bop
)
that is, each arg on its own line, and the close paren on its own line as well. But code should be flexible and work with multiple styles whenever possible. The new release, 2.7.2, should be available in a few minutes.
from ahkpp.
for clarity, DllCall should be line separated
from ahkpp.
@FuPeiJiang your ahk_explorer script is now added as an automated test, should prevent stuff like this from happening again ๐
Add ahk-explorer test ยท mark-wiemer/vscode-autohotkey-plus-plus@76adb57
from ahkpp.
Related Issues (20)
- How to get intelisense suggestions for functions stored in '.\Documents\lib' ? HOT 2
- AHK V1 files language mode is always set to `AutoHotkeyV2` HOT 9
- Parser stops working on AHK v1.1 files HOT 4
- Extension forgot AHK location HOT 4
- "Go to definition" using Ctrl + Click jumps to another file opened in editor / or doesn't jump to definition at all within the same file if the file is very long ~10k lines HOT 1
- Wrong indentation when moving line of code out of if-statement HOT 1
- Wrong indentation: press Enter after condition-block in If-statement
- AHK++ is not activating. HOT 11
- "Run" command thinks a V1 script is V2. HOT 4
- Formatter replaces multiple spaces with a single space inside a string HOT 1
- Wrong indentation on copy-paste HOT 6
- How to format code There is no formatter for 'ahk2' files installed. HOT 2
- No format intelicence or formating or colors HOT 4
- Language Switch problems HOT 2
- format code feature changes the number of spaces in a constant string HOT 1
- Debugger takes keyboard focus from active window HOT 1
- The Open AutoHotkey Help command is failing HOT 2
- allow rename variables HOT 1
- Availability as standalone LSP HOT 2
- Shortcut to comment/decomment selected line HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ahkpp.