The workspace `windows-sys` constraint was pinned to 0.52 while the
Windows source uses APIs and namespaces from 0.59 (e.g. WriteFile in
Win32::Storage::FileSystem). CI built fine because Cargo.lock pinned
0.59, but downstream `cargo install`/`cargo binstall` did fresh
resolution and selected 0.52, breaking the build for users on Windows.
Align the manifest with the code:
- Bump workspace dep `windows-sys` from 0.52 to 0.59.
- HANDLE is now `*mut c_void` instead of `isize`: replace
`handle == 0` / `!= 0` with `is_null()`, initialise HANDLE locals
with `std::ptr::null_mut()`, and pass `null_mut()` as the
hTemplateFile argument to CreateFileW.
- Pass the process HANDLE through the exit-monitor thread as `usize`
(raw pointers are not Send; OS handles are safe to use cross-thread).
- Note: HPCON is still `isize` in 0.59, so its zero-init is unchanged.
Prevent late ClosePane events from closing newly spawned panes by making Windows terminal IDs monotonic. This matches the Unix backend and avoids stale pane-id collisions after a pane is closed and reopened.
* fix(web-client): prevent IME input text repetition
Fix bug where composing multi-character strings via IME (e.g. Chinese input method) would write the entire string N times for N characters.
Previously, parse_stdin sent the entire input buffer as raw_bytes for each KeyEvent parsed from that buffer. When IME composes "你好" (2 chars), InputParser creates 2 KeyEvents, but both carried the full "你好" bytes, causing it to be written twice.
Now, when multiple events are parsed from one buffer, each Char KeyEvent carries only its own UTF-8 bytes. Single-event buffers (most ASCII input) remain unchanged.
Fixes#4974
* fix: guard per-char raw_bytes with modifiers check
Only use per-character UTF-8 encoding for unmodified Char events in multi-event buffers. Modified keys (e.g. Ctrl+C) retain the original buffer to preserve correct VT bytes. Also clarify the comment.
* test(web-client): cover IME raw byte handling
* rustfmt
---------
Co-authored-by: Aram Drevekenin <[email protected]>
* fix: kitty keyboard cleanup on error path + 2026 DECRPM state 3 handling
lib.rs: handle_error now exits kitty keyboard protocol (ESC[<1u) before
printing the backtrace, matching the normal exit path. Previously the
kitty keyboard mode was left active on crash, corrupting subsequent
terminal input.
stdin_ansi_parser.rs: synchronized_output_from_bytes now treats DECRPM
state 3 (permanently set) as enabled, matching states 1 and 2. State 3
is a valid "supported and on" response that was previously falling through
to None (treated as unsupported).
* docs: update changelog
* refactor(client): unify terminal teardown/setup sequences
- Extract named constants for all terminal escape sequences
- Add terminal_teardown_message() helper used by all three exit paths,
fixing several pre-existing inconsistencies in the process:
- handle_error was missing RESET_STYLE and SHOW_CURSOR
- remote client had kitty keyboard exit after EXIT_ALTERNATE_SCREEN
instead of before
- goodbye path had goto positioned in the alt screen before exit
- RESET_STYLE/SHOW_CURSOR are now sent after EXIT_ALTERNATE_SCREEN
so they take effect in the normal screen
- Replace write() with write_all() throughout; drop redundant let _ =
on unwrap() calls
* docs: update changelog
PR #4967 added VT modifier encoding for non-Char keys but the guard
condition also matched Char keys, re-encoding Ctrl+C from [0x03] to
CSI u sequence \x1b[3;5u which shells don't understand. Skip the
encoding block for Char keys since they already handle modifiers.
WiX v7 introduced a mandatory EULA acceptance that breaks unattended
CI builds. Pin the dotnet tool install to 6.0.2 to match the extension.
Co-authored-by: divens <[email protected]>
As Zellij always handles OSC 52 from inner programs and then forwards
it appropriately (`copy_command`, `copy_clipboard`), I think it makes
sense to unconditionally report OSC 52 support.
Co-authored-by: Michael Hoang <[email protected]>
* fix: respect --name flag when creating and renaming panes
Three issues fixed:
1. Pane creation: --name was silently discarded for default shell panes
because use_terminal_title was true. Now user-provided names take
priority. Also pass initial_pane_title as pane_name to TerminalPane
constructor (was hardcoded to empty string).
2. CLI rename without --pane-id: was routed through PaneNameInput which
appends to existing name. Now uses a dedicated RenameActivePane action
that fully replaces the name, working for any name length including
single characters.
3. Interactive rename: entering rename mode preserves the existing name
for editing (append/backspace). Esc reverts to the name before rename
mode was entered.
Adds 28 tests covering rename semantics, interactive editing, undo,
OSC title interaction, and a wire-level IPC round-trip test.
* refactor: route active-pane rename via Option<PaneId>
Replace the dedicated Action::RenameActivePane variant with an
Option<PaneId> on the existing Action::RenamePaneByPaneId. route.rs
dispatches None to the server-internal ScreenInstruction::RenameActivePane
and Some(id) to the existing RenamePaneWithPaneId path.
Drops all proto/conversion boilerplate for the removed variant: plugin
API additions, IPC tag 137, and both directions of the wire conversion.
---------
Co-authored-by: divens <[email protected]>
* fix: position host cursor for CJK IME even when app hides cursor
When apps like Claude Code (ink/React library) hide the cursor during
rendering, Zellij's render_cursor() was not sending a CUP sequence to
the host terminal. This caused IME composition candidates to appear at
the wrong position, breaking CJK input in these apps.
Change cursor_coordinates() to return the cursor position unconditionally
(as long as it is within bounds) along with a bool indicating visibility.
render_cursor() now positions the host cursor even when the app has hidden
it, so the IME subsystem can read the correct cursor position.
* add test
* rustfmt
---------
Co-authored-by: Aram Drevekenin <[email protected]>
On the native console input path, crossterm captures modifier flags
from INPUT_RECORD but the raw bytes written to the PTY don't include
them. This causes inner applications to never see ALT, SHIFT, or CTRL
modifiers for keys like Enter, Tab, Backspace, arrows, and function
keys.
Encode modifiers using standard VT conventions:
- Simple keys (Enter, Tab, Backspace): ALT uses ESC prefix, other
modifiers use CSI u encoding
- CSI letter-final keys (arrows, Home, End): xterm modifier parameter
- CSI tilde keys (PageUp, Delete, F5+): modifier before tilde
- SS3 keys (F1-F4): convert to CSI with modifier
Co-authored-by: divens <[email protected]>
* fix(web-client): use base URL when switching sessions
Session switch redirected to /{session_name} instead of
{base_url}/{session_name}, breaking reverse proxy setups.
Use getBaseUrl() to construct the redirect URL, consistent with
how auth.js and connection.js already handle base URL.
Fixes#4980
Co-authored-by: Copilot <[email protected]>
* fix(web-client): encode session name in redirect URL
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
* docs: update changelog
---------
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
Co-authored-by: Thomas Linford <[email protected]>
- cross-compile musl binary on macOS via cargo-zigbuild, with
arch-independent symlink so snapshots are stable across x86_64 and aarch64
- kill_running_sessions() now calls stop_zellij() instead of
start_zellij(), eliminating 3s startup per test
- prevent steps from firing prematurely by tightening completion conditions
and adding re-send logic for garbled keys
* Preserve scrollback for partial scroll regions starting at top
When a partial scroll region starts at row 0 (the top of the viewport),
lines scrolled off the top were silently discarded via viewport.remove(0)
instead of being transferred to lines_above (the scrollback buffer).
This affected both add_canonical_line and rotate_scroll_region_down.
Applications like Codex CLI use partial scroll regions to push rendered
content into terminal scrollback (via DECSTBM + newlines). In tmux,
these lines are preserved in the scrollback buffer and accessible via
copy-mode scrolling. In Zellij, they were lost, causing mouse wheel
scrolling to show only stale pre-application content.
Transfer lines to lines_above when scroll_region_top == 0 and alternate
screen is not active, matching the behavior of tmux.
* add selection handling to CSI S, add matching handling for CSI M, add tests
* add pr
---------
Co-authored-by: Aram Drevekenin <[email protected]>
- Consume unused CompilationResult from embed_resource::compile in build.rs
- Gate std::io::prelude import with #[cfg(unix)] since it's only used by
daemonize_web_server which is unix-only
Co-authored-by: divens <[email protected]>
* initial implementation
* tests
* fix: always report to zellij, only report to app if it wants a report
* rustfmt
* fix: always report capabilities to panes requesting them
* rustfmt
* add pr
* ci: add cross-compilation test for riscv64
* ci: add riscv64 to release binaries
* ci: switch riscv64 to musl target, consistent with other Linux targets
* ci: remove separate cross-compile workflow (not needed per reviewer)