From f730de2c150720ee70d4d7be4b8bb533c7dfc97e Mon Sep 17 00:00:00 2001 From: Adam Kruszewski Date: Fri, 22 Mar 2024 19:14:03 +0100 Subject: [PATCH] Added fix when region is selected Thanks Jeffrey Phillips for this patch! --- corfu-candidate-overlay.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/corfu-candidate-overlay.el b/corfu-candidate-overlay.el index e2ef206..43cec72 100644 --- a/corfu-candidate-overlay.el +++ b/corfu-candidate-overlay.el @@ -5,7 +5,7 @@ ;; Author: Adam Kruszewski ;; Maintainer: Adam Kruszewski ;; Created: 2023 -;; Version: 1.5 +;; Version: 1.6 ;; Package-Requires: ((emacs "28.1") (corfu "0.36")) ;; Homepage: https://code.bsdgeek.org/adam/corfu-candidate-overlay/ @@ -263,6 +263,9 @@ the end of word." ;; short-circuit conditions -- the earlier we return, if don't need to do ;; anything, the better. (if (and + ;; when region selected, as the cursor will be placed wrong. + ;; (thanks Jeff Phillips for this contribution!) + (not (region-active-p)) ;; we are not in minibuffer, as it looks awkward. (not (minibuffer-window-active-p (selected-window))) (not corfu-auto) ;; don't work with corfu-auto