Skip to content

Restore the selected history command as the search - #90

Merged
Gubarz merged 1 commit into
cheatmd-dev:mainfrom
echo8134:fix/history-search
Sep 30, 2026
Merged

Gubarz merged 1 commit into
cheatmd-dev:mainfrom
echo8134:fix/history-search

Conversation

@echo8134

Copy link
Copy Markdown
Contributor

Summary

Closing history restored the old search after inserting the selected command. Close history first, then set the recorded command and move the cursor to its end.

Related issues

No linked issue.

Verification

Model tests cover the missing/existing cheat cases, cursor and picker bounds. A real terminal session accepts a missing entry and appends text at the command's end.

Local checks passed on Go 1.27.1. The CI workflow uses Go 1.26.3.

Checklist

  • go build ./... and go test ./... pass
  • gofmt -l . and go vet ./... are clean
  • Added regression tests for the changed behavior
  • cheatmd --lint examples/ passes
  • Docs/wiki changes are not needed for this fix

@Gubarz
Gubarz marked this pull request as ready for review September 30, 2026 20:59
@Gubarz
Gubarz merged commit 8832415 into cheatmd-dev:main Sep 30, 2026
1 check passed
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.

2 participants