Skip to content

Commit

Permalink
Fix: completion-at-point in compose buffers
Browse files Browse the repository at this point in the history
Previously these functions only worked in a compose buffer when point
was at the beginning of the buffer.
  • Loading branch information
Phil Sainty committed Feb 23, 2024
1 parent 2a79d91 commit 0d9451a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ Ement.el doesn't support encrypted rooms natively, but it can be used transparen
*Fixes*

+ Edits to previous edit events are correctly sent to the server as edits to the original message event. ([[https://github.com/alphapapa/ement.el/issues/230][#230]]. Thanks to [[https://github.com/phil-s][Phil Sainty]].)
+ Completion at point works more reliably in compose buffers (Thanks to [[https://github.com/phil-s][Phil Sainty]].)

** 0.14

Expand Down
10 changes: 4 additions & 6 deletions ement-room.el
Original file line number Diff line number Diff line change
Expand Up @@ -5268,9 +5268,8 @@ 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)
(if (minibufferp)
(1+ (point))
(point)))))
(skip-syntax-forward "-")
(point))))
(end (point))
(collection-fn (completion-table-dynamic
;; The manual seems to show the FUN ignoring any
Expand All @@ -5286,9 +5285,8 @@ 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)
(if (minibufferp)
(1+ (point))
(point)))))
(skip-syntax-forward "-")
(point))))
(end (point))
(collection-fn (completion-table-dynamic
;; The manual seems to show the FUN ignoring any
Expand Down

0 comments on commit 0d9451a

Please sign in to comment.