From 0073d05329335dbb0eb85f5c3044e42805d144e5 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 23 Oct 2026 17:10:58 -0300 Subject: Callstack lists every caller and pages a tree too big for one query; memory bounds and resident-size fixes Callstack walks while the server answers, counts on the message row past a second, puts test callers last at each level, and ends a tree past one query's memory (memory.limits.arena.lsp_query, a 256 MiB region taken and given back per query) in a row whose Callstack shows the next page. Grep reads whole files. New hard limits: undo text per file, image decode pixels, the LSP snapshot of other open files, one paste. Safe builds no longer fill worst-case buffers with 0xAA (memory.unfilled), big regions are kept off transparent huge pages, and malloc_trim runs after big results. Also: Look's git show pages into a +Diff, and dropped marks in File. Co-Authored-By: Claude Opus 5.5 --- docs/typ/guide.typ | 14 +++++++++++--- docs/typ/reference.typ | 9 +++++---- 2 files changed, 16 insertions(+), 7 deletions(-) (limited to 'docs') diff --git a/docs/typ/guide.typ b/docs/typ/guide.typ index a5327a44..e60b4231 100644 --- a/docs/typ/guide.typ +++ b/docs/typ/guide.typ @@ -240,11 +240,19 @@ wrapping. Cross-directory Look paths are shortened when possible. pane. #word("LookNext") / #word("LookPrev") (#keys("SPC j n", "SPC j p")) select locations without opening them. The view follows the language server's static call hierarchy; recursive paths are marked `↻`, and a -large hierarchy invites continuing from another function. +hierarchy deeper than the limit invites continuing from another function. +Every caller is listed: the walk runs as long as the server keeps answering, +says how many callers it has found on the message row once it takes more +than a second, and shows what it found if the server stops answering. +Asking anything else stops it. A tree too big for one page (about 100,000 +rows, the memory one query may use) ends in a row saying so: running +#word("Callstack") in `+Callstack` shows the next page, from where this +one stopped, with that caller's own callers above it again. +At each level, callers whose function or file name contains "test" come +after the rest. #word("CallstackDepth") reports the current caller depth; `CallstackDepth 16` changes it for subsequent queries. The default is 8 -levels, and the accepted range is 1–64. The view also caps collection at -64 callers. +levels, and the accepted range is 1–64. `CallstackLayout stacked` (the default) puts each signature and call snippet below its location, aligned with the location text; `CallstackLayout inline` puts it diff --git a/docs/typ/reference.typ b/docs/typ/reference.typ index bb13b011..c14ad659 100644 --- a/docs/typ/reference.typ +++ b/docs/typ/reference.typ @@ -264,7 +264,9 @@ A line written to #file("exec") is #word("Exec"): a declaration; from a use it reaches every file); #word("Callstack") (#key("g c") or #key("SPC l b")) opens and focuses `+Callstack`, with static caller ancestry, tree-sitter signatures and Look locations - for callers and call sites. #word("CallstackDepth") reports or sets the + for callers and call sites, test callers after the rest at each level; run + in `+Callstack` itself, it shows the next page of a tree too big for one. + #word("CallstackDepth") reports or sets the runtime depth (1–64, default 8) for subsequent queries. `CallstackLayout stacked` (the default) aligns snippets below their locations; `CallstackLayout inline` places the snippets beside them. @@ -971,12 +973,11 @@ one a #file("exec") open still holds is never reused. In a command pane, #key("n = Find and Grep #word("Find") matches file names, #word("Grep") the text of lines, both literally and -ignoring ASCII case. #word("Grep") reads at most 256 KiB of a file and stops at 512 +ignoring ASCII case. #word("Grep") reads whole files and stops at 512 hits, #word("Find") at 512 names. The walk stops at 20000 files or 100000 entries, 16 deep, and passes over `.git`, `.jj`, `target`, `node_modules`, `.venv`, `__pycache__`, `.zig-cache` and `zig-out`. A cap hit, or a -directory it could not open, is said at the end: `cut at 512 hits`, `N -files read only in part (first 256 KiB)`, `walk cut at N entries`, `N +directory it could not open, is said at the end: `cut at 512 hits`, `walk cut at N entries`, `N directories skipped: permission denied`. A search that finds nothing and skipped nothing fails, `Grep: text not found`, and leaves the `+Search` as it was. -- cgit v1.3