branch: externals/mct
commit 9c60491d5d37057ad0345d7dc111746498f37333
Author: Daniel Mendler <m...@daniel-mendler.de>
Commit: Protesilaos Stavrou <i...@protesilaos.com>

    Remove mct--input-string which is unused
    
    Instead directly compute the length of the input.
---
 mct.el | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/mct.el b/mct.el
index 9c59ec8..15881a6 100644
--- a/mct.el
+++ b/mct.el
@@ -264,14 +264,10 @@ Add this to `completion-list-mode-hook'."
       (setq-local window-resize-pixelwise t))
     (fit-window-to-buffer window (floor (frame-height) 2) 1)))
 
-(defun mct--input-string ()
-  "Return the contents of the minibuffer as a string."
-  (buffer-substring-no-properties (minibuffer-prompt-end) (point-max)))
-
 (defun mct--minimum-input ()
   "Test for minimum requisite input for live completions.
 See `mct-minimum-input'."
-  (>= (length (mct--input-string)) mct-minimum-input))
+  (>= (- (point-max) (minibuffer-prompt-end)) mct-minimum-input))
 
 ;;;;; Live-updating Completions' buffer
 

Reply via email to