Skip to content

Commit 2c062b8

Browse files
committed
docs: add LEARNINGS entry for nowait keymap resolution fix
1 parent 1cfe066 commit 2c062b8

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

LEARNINGS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ pitfall, log it here. Check this file before starting any task.
1717
- 2026-07-07: http/dep-execution — `execute_dependent_request_async` (line 298) used `dep_req.start_line` as `--line` but sent only the dep's block text via stdin. Rust parser's `parse_at_line` counts lines from stdin, finds `--line` > stdin line count, bails with "No request found". Dep silently fails, ref stays unresolved. Fix: use `--line 1` since stdin always has only the block (starting at `###`). This bug existed before the recursive change — old code also passed block text with wrong line. See `lua/poste/http/request_vars.lua:323`.
1818
- 2026-07-07: http/dep-file-vars — `execute_dependent_request_async` sends only dep's block text via stdin, so Rust parser's `extract_file_variables` sees NO file-level `@var` lines (they're above `###` in the original file). `{{base_url}}` (from `@base_url = https://...`) stays unresolved → CLI builds request to `{{base_url}}/path` → HTTP fails with status 0 + empty body → `resolve_request_variable` returns nil at `if not body or body == "" then return nil end` → ref stays as `{{...}}`. Fix: `read_file_vars_from_path` helper reads `@var` lines (before first `###`) from the source file on disk; `execute_dependent_request_async` prepends them to stdin content and adjusts `--line` to point at the dep's `###` within the combined content. See `lua/poste/http/request_vars.lua:290-321`.
1919

20+
- 2026-07-08: http/nav-lag — `[`/`]` felt laggy even though Lua code ran <10ms. Root cause: missing `nowait = true` in keymap opts. If any global mapping uses `[` as prefix (e.g. `[c` from vim-unimpaired), Neovim waits up to `timeoutlen` before firing, creating perceived delay. Fix: add `nowait = true` to all response buffer keymaps. See `lua/poste/http/buffer.lua:257`.
21+
2022
## Entries
2123

2224
- 2026-06-26: agent — `lua local function f()` defined after its first caller causes "nil value" at runtime. Lua requires local functions to be declared before use, or forward-declared via `local f`. Fix: always order helper functions top-down, or add `local f` forward decl at module top. See `lua/poste/http/request_vars.lua:155-160`.

0 commit comments

Comments
 (0)