update at 2025-11-04 20:25:12

This commit is contained in:
douboer
2025-11-04 20:25:12 +08:00
parent 931c99a4d8
commit aa18b18853
7 changed files with 50 additions and 11 deletions

View File

@@ -55,6 +55,19 @@
---
## [2.0.2] - 2025-11-04
### 修复
- 终端兼容性:修复在 macOS 终端vi/vim中按 ESC 时,子进程输出导致标题栏短暂闪烁的问题(使用 nohup/background 方式彻底静默化命令执行)
- 兼容性:移除 `job_start(..., {'detach': v:true})` 不兼容选项,改以更通用的后台执行方式
### 文档
- 补充 RELEASE/README 中关于终端下行为的说明
---
## [1.0.8] - 2025-01-04
这是一个重大更新版本,引入了输入法状态记忆功能,并修复了多个关键问题。

View File

@@ -55,6 +55,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
---
## [2.0.2] - 2025-11-04
### Fixed
- Terminal compatibility: Fixed brief terminal/tab title flash when invoking `fcitx-remote` from terminal Vim by launching commands fully detached (nohup/background) and redirecting output
- Compatibility: Removed unsupported `job_start(..., {'detach': v:true})` usage to work with more Vim builds
### Documentation
- Minor docs update: note terminal behavior fix in README and RELEASE
---
## [1.0.8] - 2025-01-04
This is a major update that introduces input method state memory and fixes several critical issues.

View File

@@ -107,6 +107,8 @@ sudo pacman -S fcitx
./deploy.sh
```
Note: v2.0.2 fixes a terminal-specific title/flash issue when using terminal Vim (see CHANGELOG for details).
## 使用方法
### 基本使用场景

View File

@@ -98,6 +98,8 @@ Deploy both plugins with a single command:
./deploy.sh
```
Note: v2.0.2 fixes a terminal-specific title/flash issue when using terminal Vim (see CHANGELOG for details).
## Usage
### Basic Usage Scenarios

View File

@@ -1,11 +1,19 @@
# 版本发布说明 RELEASE NOTE
## v2.0.0
## v2.0.1
**发布日期**: 2025-11-04
---
### v2.0.1 - Patch Notes
- 验证并修复终端macOS Terminal / iTerm2`vi``ESC` 时顶部短暂显示 `fcitx-remote` 的问题(使用 `nohup` + 后台执行并重定向,避免任何 stderr/stdout 导致的 UI 更新)
- 修复:删除对 `job_start` 不兼容的 `{'detach': v:true}` 选项以兼容更多 Vim 构建
- 文档微调:更新 README/CHANGELOG/RELEASE记录上述兼容性修复
---
### 版本概述
版本 2.0.0 是一个重要的里程碑版本,为 Vim 输入法自动切换插件带来了重大改进。此版本包含:
@@ -206,6 +214,3 @@ npm run build
### 许可证
MIT License - 详见 [LICENSE.txt](./LICENSE.txt)
---

View File

@@ -63,9 +63,9 @@ echo -e " • styles.css"
# 复制 Vim 插件
echo -e "${YELLOW}📋 复制 Vim 插件...${NC}"
mkdir -p ~/.vim/plugin
cp -f fcitx-osx.vim ~/.vim/plugin/
cp -f vim-im-switch.vim ~/.vim/plugin/
echo -e "${GREEN}✅ Vim 插件复制完成:${NC}"
echo -e " • fcitx-osx.vim → ~/.vim/plugin/"
echo -e " • vim-im-switch.vim → ~/.vim/plugin/"
# 验证文件
echo -e "${YELLOW}🔍 验证复制的文件...${NC}"
@@ -75,4 +75,4 @@ echo -e "${GREEN}🎉 部署完成!${NC}"
echo -e "${BLUE}📍 Obsidian 插件已部署到: $TARGET_DIR${NC}"
echo -e "${BLUE}📍 Vim 插件已部署到: ~/.vim/plugin/${NC}"
echo -e "${YELLOW}💡 请重启 Obsidian 或重新加载插件以使更改生效${NC}"
echo -e "${YELLOW}💡 Vim 插件将在下次启动 Vim 时自动加载${NC}"
echo -e "${YELLOW}💡 Vim 插件将在下次启动 Vim 时自动加载${NC}"

View File

@@ -51,9 +51,13 @@ function! Fcitx2en()
" 切换到英文输入法(使用后台任务并重定向所有输出)
if has('job')
call job_start(['sh', '-c', 'fcitx-remote -s ' . shellescape(g:fcitx_english_im) . ' >/dev/null 2>&1'])
" Use nohup in a shell backgrounded process. Some Vim builds don't accept
" the 'detach' option; calling via sh -lc with nohup/& keeps process
" disassociated while avoiding unsupported job_start options.
call job_start(['sh', '-lc', 'nohup fcitx-remote -s ' . shellescape(g:fcitx_english_im) . ' >/dev/null 2>&1 &'])
else
call system("fcitx-remote -s " . shellescape(g:fcitx_english_im) . " >/dev/null 2>&1 &")
" Fallback: nohup in background
call system('nohup fcitx-remote -s ' . shellescape(g:fcitx_english_im) . ' >/dev/null 2>&1 &')
endif
endfunction
@@ -71,9 +75,9 @@ function! Fcitx2zh()
" 上次是中文输入法,恢复到那个输入法(使用后台任务并重定向所有输出)
if has('job')
call job_start(['sh', '-c', 'fcitx-remote -s ' . shellescape(g:fcitx_last_insert_im_name) . ' >/dev/null 2>&1'])
call job_start(['sh', '-lc', 'nohup fcitx-remote -s ' . shellescape(g:fcitx_last_insert_im_name) . ' >/dev/null 2>&1 &'])
else
call system("fcitx-remote -s " . shellescape(g:fcitx_last_insert_im_name) . " >/dev/null 2>&1 &")
call system('nohup fcitx-remote -s ' . shellescape(g:fcitx_last_insert_im_name) . ' >/dev/null 2>&1 &')
endif
endfunction
" ---------------------------------------------------------------------