Skip to content

Commit

Permalink
Merge branch '#215' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
zero-plusplus committed May 22, 2022
2 parents cb42fa6 + c1257e2 commit b3c8371
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Also want to check the development status, check the [commit history](https://gi
### Fixed
* [#207](https://github.com/zero-plusplus/vscode-autohotkey-debug/issues/207) Attach fails if file path contains multibyte strings
* [#212](https://github.com/zero-plusplus/vscode-autohotkey-debug/issues/212) Some errors were not detected and raw error messages were output. This caused `useAutoJumpToError` to not work in some cases
* [#215](https://github.com/zero-plusplus/vscode-autohotkey-debug/issues/215) The list of running AutoHotkey processes displayed before attaching does not display correctly when it contains multibyte strings

## [1.11.0] - 2022-02-11
### Added
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ This extension is a debugger adapter for [VSCode](https://code.visualstudio.com/
* `1.12.0` - 2022-xx-xx
* Fixed: [#207](https://github.com/zero-plusplus/vscode-autohotkey-debug/issues/207) Attach fails if file path contains multibyte strings
* Fixed: [#212](https://github.com/zero-plusplus/vscode-autohotkey-debug/issues/212) Some errors were not detected and raw error messages were output. This caused `useAutoJumpToError` to not work in some cases
* Fixed: [#215](https://github.com/zero-plusplus/vscode-autohotkey-debug/issues/215) The list of running AutoHotkey processes displayed before attaching does not display correctly when it contains multibyte strings

* `1.11.0` - 2022-02-11
* Added: [#201](https://github.com/zero-plusplus/vscode-autohotkey-debug/issues/201) Add `useLoadedScripts` to launch.json
Expand Down
2 changes: 1 addition & 1 deletion src/util/getAhkVersion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { SpawnSyncOptions, spawnSync } from 'child_process';
import { AhkVersion } from '@zero-plusplus/autohotkey-utilities';

export const getAhkVersion = (ahkRuntime: string, options?: SpawnSyncOptions): AhkVersion | null => {
const ahkCode = 'FileOpen("*", "w").write(A_AhkVersion)';
const ahkCode = 'FileOpen("*", "w", "CP65001").write(A_AhkVersion)';
const result = spawnSync(ahkRuntime, [ '/ErrorStdOut', '*' ], { ...options, input: ahkCode });
if (result.error) {
return null;
Expand Down
4 changes: 2 additions & 2 deletions src/util/getRunningAhkScriptList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const getRunningAhkScriptList = (ahkRuntime: string, options?: SpawnSyncO
RegExMatch(title, "O)(?<path>.+)(?=\\s-)", match)
processPathList .= match.path "\`n"
}
FileOpen("*", "w").write(RTrim(processPathList, "\`n"))
FileOpen("*", "w", "CP65001").write(RTrim(processPathList, "\`n"))
` : `
A_DetectHiddenWindows := true
idList := WinGetList("ahk_class AutoHotkey")
Expand All @@ -35,7 +35,7 @@ export const getRunningAhkScriptList = (ahkRuntime: string, options?: SpawnSyncO
RegExMatch(title, "(?<path>.+)(?=\\s-)", &match)
processPathList .= match.path "\`n"
}
FileOpen("*", "w").write(RTrim(processPathList, "\`n"))
FileOpen("*", "w", "CP65001").write(RTrim(processPathList, "\`n"))
`;
const result = spawnSync(ahkRuntime, [ '/ErrorStdOut', '*' ], { ...options, input: ahkCode });
if (result.error) {
Expand Down

0 comments on commit b3c8371

Please sign in to comment.