Skip to content

Fix error on backspace in deadgrep-incremental with empty search term - #173

Open
Wilfred wants to merge 1 commit into
masterfrom
claude/fix-incremental-backspace
Open

Wilfred wants to merge 1 commit into
masterfrom
claude/fix-incremental-backspace

Conversation

@Wilfred

@Wilfred Wilfred commented Aug 16, 2026 •

Copy link
Copy Markdown
Owner

Pressing backspace in deadgrep-incremental when the search term is empty (before typing anything, or after deleting the whole term) signalled args-out-of-range, because (s-left -1 "") calls (substring "" 0 -1). Backspace is now a no-op when the term is already empty; deleting the last character uses a plain substring.

Also adds the missing docstring to deadgrep-incremental.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MwUBSSJnCtCeoqJEA3xH48

(s-left -1 "") signals args-out-of-range, so pressing backspace in
deadgrep-incremental before typing anything (or after deleting the
whole term) errored out of the incremental search. Make backspace a
no-op when the term is already empty.

Also add a docstring to deadgrep-incremental.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MwUBSSJnCtCeoqJEA3xH48
@Wilfred
Wilfred force-pushed the claude/fix-incremental-backspace branch from 6d3f792 to 8a14ce3 Compare August 18, 2026 21:31
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 59.79% (-0.07%) from 59.86% — claude/fix-incremental-backspace into master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants