Commit 3cde5fc
committed
Support lifting topic limit on the fly when using Helm
When using built-in completion, vertico, and I assume most other
completion frameworks, `forge-read-topic-lift-limit' can call some
function which causes the `completion-table-dynamic' function to be
called again.
Calling `helm-force-update' does not do that. It also does not call
`forge--read-topic' again. It does however do some recalculations
(I don't understand how), which do take `forge-limit-topic-choices'
into account. When that calculation takes place, the minibuffer is
not current, and because we temporarily lift the limit by setting
`forge-limit-topic-choices' to nil in that buffer, that means that
for Helm the limit is still in place.
Trying to counter act this by making the minibuffer, or the helm
buffer, current when setting the variable and/or when calling
`helm-force-update', did not work.
So we have to set the global value instead. But that would mean
that the filter remains off for all future invocations. So we have
to re-enable filtering, every time `forge--read-topic' is invoked.
But some users might want to actually remove the filter for good,
so we have to give them another variable that the can use to make
their preference known: `forge-read-topic-lift-limit-for-helm'.
See emacs-helm/helm#2744.1 parent b372fad commit 3cde5fc
1 file changed
Lines changed: 19 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
| |||
719 | 722 | | |
720 | 723 | | |
721 | 724 | | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
722 | 728 | | |
| 729 | + | |
| 730 | + | |
723 | 731 | | |
724 | 732 | | |
725 | 733 | | |
| |||
772 | 780 | | |
773 | 781 | | |
774 | 782 | | |
775 | | - | |
776 | | - | |
777 | 783 | | |
778 | 784 | | |
779 | 785 | | |
780 | 786 | | |
| 787 | + | |
781 | 788 | | |
782 | 789 | | |
783 | | - | |
784 | | - | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
785 | 799 | | |
786 | 800 | | |
787 | 801 | | |
| |||
0 commit comments