File Modification Deadlock with Nerd Font Characters

Status Fixed / completed
Maintainer reply None cached
Activity 1 comment · opened Jul 3, 2025 · closed Sep 23, 2025

Bug Description
I'm encountering an issue where files containing Nerd Font characters are causing repeated modification failures. The process seems to get stuck in a loop, attempting to modify the file around 7 to 8 times before successfully applying the changes. It appears the successful modification involves clearing the target line and then rewriting the content

Environment Info

  • Platform: darwin
  • Terminal: tmux
  • Version: 1.0.41
  • Feedback ID: ce0546d7-16d9-429f-864e-03df6118af97

logs

⏺ Update(run/ui.lua)
  ⎿  Error: String to replace not found in file.
     String:       " 暫時禁用通用日誌等級高亮,避免與ANSI色彩衝突
           " syn match RazLogInfo '\v\c(info|done|success|completed|✓)'
           " syn match RazLogWarn '\v\c(warn|warning|⚠)'
           " syn match RazLogError '\v\c(error|fail|failed|exception|✗)'
           " syn match RazLogDebug '\v\c(debug|trace)'"

⏺ 讓我先找到正確的位置:

⏺ Search(pattern: "暫時禁用", path: "run", include: "ui.lua")
  ⎿  Found 1 file (ctrl+r to expand)

⏺ Read(run/ui.lua)
  ⎿  Read 15 lines (ctrl+r to expand)

⏺ Bash(grep -n "暫時禁用" /Volumes/dyn/Dropbox/_env/mac/cfg/nvim/lua/raz/run/ui.lua)
  ⎿  408:      " 暫時禁用通用日誌等級高亮,避免與ANSI色彩衝突

⏺ Read(run/ui.lua)
  ⎿  Read 10 lines (ctrl+r to expand)

⏺ 好的,讓我重新啟用原本的語法高亮:

⏺ Update(run/ui.lua)
  ⎿  Error: String to replace not found in file.
     String:       " 暫時禁用通用日誌等級高亮,避免與ANSI色彩衝突
           " syn match RazLogInfo '\v\c(info|done|success|completed|✓)'
           " syn match RazLogWarn '\v\c(warn|warning|⚠)'
           " syn match RazLogError '\v\c(error|fail|failed|exception|✗)'
           " syn match RazLogDebug '\v\c(debug|trace)'"

⏺ Update(run/ui.lua)
  ⎿  Error: String to replace not found in file.
     String: 
           " syn match RazLogInfo '\v\c(info|done|success|completed|✓)'
           " syn match RazLogWarn '\v\c(warn|warning|⚠)'
           " syn match RazLogError '\v\c(error|fail|failed|exception|✗)'
           " syn match RazLogDebug '\v\c(debug|trace)'"

⏺ 讓我看看實際的內容:

⏺ Read(run/ui.lua)
  ⎿  Read 5 lines (ctrl+r to expand)

⏺ Update(run/ui.lua)
  ⎿  Error: String to replace not found in file.
     String:       " 暫時禁用通用日誌等級高亮,避免與ANSI色彩衝突
           " syn match RazLogInfo '\v\c(info|done|success|completed|✓)'
           " syn match RazLogWarn '\v\c(warn|warning|⚠)'
           " syn match RazLogError '\v\c(error|fail|failed|exception|✗)'
           " syn match RazLogDebug '\v\c(debug|trace)'"

Errors

[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n    at genericNodeError (node:internal/errors:983:15)\n    at wrappedFn (node:internal/errors:537:14)\n    at checkExecSyncError (node:child_process:882:11)\n    at execSync (node:child_process:954:15)\n    at JI (file:///Users/raz/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:702:3921)\n    at file:///Users/raz/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:623:9038\n    at Q (file:///Users/raz/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:526:13327)\n    at _X (file:///Users/raz/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:623:8184)\n    at w_ (file:///Users/raz/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:623:7265)\n    at U9 (file:///Users/raz/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:623:11432)","timestamp":"2025-07-03T20:03:16.694Z"},{"error":"Error: String not found in file. Failed to apply edit.\n    at UT (file:///Users/raz/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1631:728)\n    at WAA (file:///Users/raz/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1631:104)\n    at Object.renderToolUseRejectedMessage (file:///Users/raz/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1641:3404)\n    at _T2 (file:///Users/raz/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1958:2886)\n    at ZU (file:///Users/raz/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:65:19802)\n    at UP (file:///Users/raz/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:67:42556)\n    at wP (file:///Users/raz/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:67:38105)\n    at o$ (file:///Users/raz/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:67:38033)\n    at MU (file:///Users/raz/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:67:37887)\n    at EJ (file:///Users/raz/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:67:34977)","timestamp":"2025-07-03T20:03:17.202Z"}]

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗