Порівняти коміти

...
Автор SHA1 Повідомлення Дата
熊猫同学 646fb1e876 fix(ide-workspace): declare GetProcessTimes consistently
Two modules declared the same kernel32 function with different
out-pointer types (FileTime vs packed u64), which clippy rejects
under -D warnings. Both now read the packed u64.
2026-11-15 08:23:23 +08:00
l0ng-ai e26e1d1d7d fix(themes): add the shell command token to the theme template and docs (#3464)
#3458 added --syn-shell-command without setting it in the Harbor Night
scheme (the template new themes start from) or regenerating plugins/themes.md,
so scripts/theme/theme.test.ts failed. Imported IntelliJ schemes map
BASH.EXTERNAL_COMMAND to it.
2026-11-15 08:23:20 +08:00
4 змінених файлів з 11 додано та 14 видалено

No files matched your search

+7 -13
Переглянути файл
@@ -246,30 +246,24 @@ mod imp {
}
pub fn process_start() -> Option<std::time::SystemTime> {
#[repr(C)]
#[derive(Default)]
struct FileTime {
low: u32,
high: u32,
}
#[link(name = "kernel32")]
unsafe extern "system" {
// The same signature `memory.rs` declares: FILETIMEs read as packed u64s.
fn GetProcessTimes(
process: *mut std::ffi::c_void,
creation: *mut FileTime,
exit: *mut FileTime,
kernel: *mut FileTime,
user: *mut FileTime,
creation: *mut u64,
exit: *mut u64,
kernel: *mut u64,
user: *mut u64,
) -> i32;
}
let (mut c, mut e, mut k, mut u) = Default::default();
// SAFETY: all out-pointers are valid FILETIME structs.
// SAFETY: all out-pointers are valid 64-bit FILETIME slots.
let ok = unsafe { GetProcessTimes(GetCurrentProcess(), &mut c, &mut e, &mut k, &mut u) };
if ok == 0 {
return None;
}
let c: FileTime = c;
let ticks = ((c.high as u64) << 32) | c.low as u64; // 100 ns since 1601-01-01
let ticks = c; // 100 ns since 1601-01-01
let unix_100ns = ticks.checked_sub(116_444_736_000_000_000)?;
Some(std::time::UNIX_EPOCH + std::time::Duration::from_nanos(unix_100ns * 100))
}
+1
Переглянути файл
@@ -9,6 +9,7 @@
"--syn-type": "#8fd4c9",
"--syn-function": "#f2d07a",
"--syn-function-call": "#d9dfe8",
"--syn-shell-command": "#e8a46a",
"--syn-comment": "#6b7a8f",
"--syn-comment-style": "normal",
"--syn-doc-comment": "#74889c",
+2 -1
Переглянути файл
@@ -332,7 +332,7 @@ a token.
<!-- BEGIN GENERATED TOKEN REFERENCE: pnpm gen:theme-docs -->
266 themeable tokens: 125 in the UI theme file, 141 in the editor colour scheme file.
267 themeable tokens: 125 in the UI theme file, 142 in the editor colour scheme file.
### Surfaces (UI theme)
@@ -429,6 +429,7 @@ a token.
| `--syn-type` | `#bcbec4` | `#000000` |
| `--syn-function` | `#56a8f5` | `#00627a` |
| `--syn-function-call` | `#bcbec4` | `#080808` |
| `--syn-shell-command` | `#c57633` | `#0073bf` |
| `--syn-comment` | `#7a7e85` | `#8c8c8c` |
| `--syn-comment-style` | `normal` | `italic` |
| `--syn-doc-comment` | `#5f826b` | `#8c8c8c` |
+1
Переглянути файл
@@ -198,6 +198,7 @@ export const ICLS_ATTRIBUTES: Record<string, Array<[Part, string]>> = {
"PY.DOC_COMMENT_TAG": [["FOREGROUND", "--syn-python-docstring-tag"]],
OPENIDEA_pyDocstringKeyword: [["FOREGROUND", "--syn-python-docstring-keyword"]],
"PY.BUILTIN_NAME": [["FOREGROUND", "--syn-predefined"]],
"BASH.EXTERNAL_COMMAND": [["FOREGROUND", "--syn-shell-command"]],
MARKDOWN_HEADER_LEVEL_1: [["FOREGROUND", "--syn-markup-heading"]],
MARKDOWN_CODE_SPAN: [["FOREGROUND", "--syn-markup-code"]],
MARKDOWN_LINK_TEXT: [["FOREGROUND", "--syn-link"]],