branch: externals-release/ement commit 896ad5311de5b999a95c26ddfc12cb2fadb085d0 Author: Adam Porter <a...@alphapapa.net> Commit: Adam Porter <a...@alphapapa.net>
Fix: Completion in minibuffer I've no idea why adding one to the point is necessary in the minibuffer, and only in the minibuffer, but it seems to be. --- README.org | 1 + ement-room.el | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.org b/README.org index 3e0d69c367..93f518cbca 100644 --- a/README.org +++ b/README.org @@ -300,6 +300,7 @@ Note that, while ~matrix-client~ remains usable, and probably will for some time *Fixes* + Restore position in room list when refreshing. ++ Completion in minibuffer. ** 0.9.1 diff --git a/ement-room.el b/ement-room.el index 2436167c86..c01190dd65 100644 --- a/ement-room.el +++ b/ement-room.el @@ -4275,8 +4275,10 @@ Web-compatible HTML output, using HTML like: Uses members in the current buffer's room. For use in `completion-at-point-functions'." (let ((beg (save-excursion - (when (re-search-backward (rx (or bol bos blank) "@") nil t) - (point)))) + (when (re-search-backward (rx (or bol bos blank)) nil t) + (if (minibufferp) + (1+ (point)) + (point))))) (end (point)) (collection-fn (completion-table-dynamic ;; The manual seems to show the FUN ignoring any @@ -4292,7 +4294,9 @@ Uses members in the current buffer's room. For use in For use in `completion-at-point-functions'." (let ((beg (save-excursion (when (re-search-backward (rx (or bol bos blank) (or "!" "#")) nil t) - (point)))) + (if (minibufferp) + (1+ (point)) + (point))))) (end (point)) (collection-fn (completion-table-dynamic ;; The manual seems to show the FUN ignoring any