Lightweight coding agent that runs in your terminal
Rust
Add C# syntax option to highlight selections (#12511)
Eric Trautd5fef5c19008
diff --git a/codex-rs/tui/src/render/highlight.rs b/codex-rs/tui/src/render/highlight.rsindex b87db29cba..c1e7e56f63 100644--- a/codex-rs/tui/src/render/highlight.rs+++ b/codex-rs/tui/src/render/highlight.rs@@ -403,6 +403,7 @@ fn find_syntax(lang: &str) -> Option<&'static SyntaxReference> {// Aliases that two-face does not resolve on its own.let patched = match lang {+ "csharp" | "c-sharp" => "c#","golang" => "go","python3" => "python","shell" => "bash",@@ -806,6 +807,7 @@ mod tests {"zig","swift","java",+ "c#","elixir","haskell","scala",@@ -829,7 +831,7 @@ mod tests {// Common file extensions.let extensions = ["rs", "py", "js", "ts", "rb", "go", "sh", "md", "yml", "kt", "ex", "hs", "pl", "php",- "css", "html",+ "css", "html", "cs",];for ext in extensions {assert!(@@ -838,7 +840,7 @@ mod tests {);}// Patched aliases that two-face cannot resolve on its own.- for alias in ["golang", "python3", "shell"] {+ for alias in ["csharp", "c-sharp", "golang", "python3", "shell"] {assert!(find_syntax(alias).is_some(),"find_syntax({alias:?}) returned None — patched alias broken"