croft-software 0.2.232

VSCode-style TUI written in Rust
fix: saving a file keeps its final newline. The newline at the end of a file was dropped on every save, so each edit showed up in git as `\ No newline at end of file`. CRLF files and files with a BOM keep theirs too.
fix: Stage Hunk and Revert Hunk apply at the hunk's own lines. When an earlier change shifted the file and the same context appeared nearby, git could apply the patch in the wrong place, staging a line at the wrong spot or deleting the wrong lines from your file.
fix: Discard on a Changes row restores the file from the index, as VS Code does, so the staged part of a partly staged file is kept. Before, it went back to HEAD and threw the staged work away too.
fix: hunk and line actions (stage, unstage, revert) work when the workspace is a subfolder of the repository. They used to send a path relative to the workspace, and git refused it or changed a same-named file at the repository root.
fix: saving a file that had bytes invalid in its encoding (shown as �) now asks first. Before, it silently replaced the original bytes. Reopen with Encoding keeps them.
fix: in the merge editor, typing on the line just after a conflict no longer marks that conflict resolved and drops both sides. Auto save also skips a merge that still has open conflicts.
fix: staging or unstaging a path with glob characters, such as Next.js's `pages/[id].tsx`, touches only that file. It used to stage matching files too, untracked ones included.
fix: discarding an untracked folder keeps the ignored files inside it, like `.env` or `node_modules/`.
fix: pasting into a terminal can no longer end bracketed paste early and run what follows. Pasted text holding `ESC[201~`, which any program in a pane can put on the clipboard with OSC 52, is cleaned first. Bracketed paste also now follows the terminal's actual mode, including a mode switch split across two reads or combined with other modes.
fix: renames, formatting and code actions from a language server land in the right place on lines that contain an emoji or another character outside the Basic Multilingual Plane. Their columns were read as characters instead of UTF-16 units, which corrupted the text, including in files that were not open.
fix: copying terminal text keeps a space that falls at a soft line wrap, and keeps combining accents.
fix: snippet completions from language servers keep backslashes (`printf("%d\n", …)`), nest placeholders correctly, and insert the first option of a choice.
fix: terminal keys keep their modifiers. Alt+Backspace deletes a word, Ctrl+Space and Ctrl+/ reach the program, Ctrl+Alt+letter keeps the Alt, and Ctrl or Shift with arrows, Home, End, Delete and function keys send xterm's modified sequences.
fix: fuzzy matching in the command palette and Quick Open compares characters, not bytes, so pieces of two different non-ASCII characters no longer combine into a false match.
fix: a large paste into a program that isn't reading its input no longer freezes croft. Terminal input is written from each pane's own thread.
fix: a language server that is slow to answer, or never answers, no longer stalls every other language server. croft no longer holds its client lock while waiting for a reply, and shutting down a server for a removed folder gives up after 3 seconds.
fix: typing over a snippet placeholder drops the placeholders nested inside it, even when the new text is the same length as the old.
fix: extracting a file from an archive no longer deletes a file of the same name that is already there when the extraction fails. The new file is written aside and moved into place only once it is complete.
fix: moving or renaming a folder in the explorer carries every open tab inside it along. Tabs used to keep the old path, and saving them recreated the old folder.
fix: a self-update keeps unsaved text in untitled buffers, and in files that could not be reopened because they were deleted or became unreadable while the update ran.
fix: `#[should_panic]` tests show their result on their own row in the test explorer instead of on a new duplicate row.
fix: when a debug adapter reports that one breakpoint was verified, the other breakpoints in that file stay marked as unverified.
fix: one malformed message from a debug adapter no longer holds back the messages behind it, such as a stop at a breakpoint.
fix: exception breakpoint filters for JavaScript reach the child session where the program runs.
fix: clicking a link in a PDF no longer freezes croft when pdftohtml hangs. It gives up after 5 seconds.