feat(tooltip): 添加环境变量展开预览悬停提示

- 新增 expand_env_vars 函数,调用 ExpandEnvironmentStringsA 展开 %VAR%
- sync_string_list_to_ui 中对含 % 的路径设置 ITEMTIP 属性
- 鼠标悬停时显示展开后的完整路径

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-01 23:45:58 +08:00
parent e5d24389b4
commit 485d16a180
3 changed files with 42 additions and 1 deletions
+4
View File
@@ -30,4 +30,8 @@ char *stristr(const char *haystack, const char *needle);
// 检查字符串列表中是否存在指定路径(不区分大小写)
int string_list_contains(const StringList *list, const char *str);
// 展开环境变量(如 %JAVA_HOME%\bin → C:\Java\bin
// 返回 malloc 分配的字符串,调用者负责释放;无变量返回 NULL
char *expand_env_vars(const char *path);
#endif // STRING_EXT_H