дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-15 14:15:39 +02:00
Порівняти коміти
2
Коміти
| Автор | SHA1 | Дата | |
|---|---|---|---|
|
|
646fb1e876 | ||
|
|
e26e1d1d7d |
No files matched your search
@@ -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))
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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` |
|
||||
|
||||
@@ -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"]],
|
||||
|
||||
Reference in new issue
Заблокувати користувача