Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review prompter internals #2630

Merged
merged 20 commits into from
Nov 18, 2022
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
8e3af88
Refactor all selection-actions as lambda-commands.
aadcg Sep 9, 2022
293780e
Simplify return-actions by ensuring it's a list.
aadcg Sep 9, 2022
1ed5639
mode/prompt-buffer: Review prompter-buffer-mode docstring.
aadcg Sep 8, 2022
eea221e
Uniformize return-actions binding to no-op.
aadcg Sep 9, 2022
31083eb
mode/prompt-buffer: Review docstring and add echo message.
aadcg Sep 13, 2022
3689c7a
libraries/prompter/prompter-source: Simplify call to slot.
aadcg Oct 16, 2022
274a561
libraries/prompter/prompter: Review outdated comment.
aadcg Oct 20, 2022
e723f40
libraries/prompter/prompter: Review docstring.
aadcg Oct 20, 2022
283fff6
gitignore: Whitelist png files under the prompter diretory.
aadcg Nov 9, 2022
ad6c173
libraries/prompter: Add illustrative image.
aadcg Nov 9, 2022
021c19d
libraries/prompter/README: Add overview section.
aadcg Oct 20, 2022
c0fcf18
libraries/prompter: Review docstrings.
aadcg Oct 21, 2022
6c17c22
libraries/prompter/prompter: Refactor resume.
aadcg Oct 21, 2022
36a1de3
libraries/prompter/prompter: Refactor selected-suggestion.
aadcg Oct 21, 2022
52ad7a0
libraries/prompter/prompter: Refactor history-pushnew.
aadcg Oct 21, 2022
db4253c
libraries/prompter/prompter: Refactor return-actions.
aadcg Oct 21, 2022
1237ffb
libraries/prompter/prompter: Rename to resolve-marks.
aadcg Oct 21, 2022
7884b8b
libraries/prompter/prompter: Deprecate timeout parameter.
aadcg Oct 21, 2022
233fe86
libraries/prompter/prompter: Simplify next-ready-p.
aadcg Oct 21, 2022
51e5933
libraries/prompter/prompter: Refactor all-ready-p.
aadcg Oct 22, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
libraries/prompter/prompter: Refactor history-pushnew.
aadcg committed Nov 18, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 52ad7a0fa5803757938d409912e11aace33139e1
10 changes: 4 additions & 6 deletions libraries/prompter/prompter.lisp
Original file line number Diff line number Diff line change
@@ -390,12 +390,10 @@ marked element; otherwise return the list of `return-actions' for the current
(slot-value (selected-source prompter) 'return-actions)))

(defun history-pushnew (history element &key (test #'equal) )
(alex:when-let ((previous-element-index (containers:element-position
history
element
:test test)))
(containers:delete-item-at history
previous-element-index))
(alex:when-let ((previous-element-index (containers:element-position history
element
:test test)))
(containers:delete-item-at history previous-element-index))
(containers:insert-item history element))