[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/inf-clojure dcb523b 191/313: Avoid computing completion bo
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/inf-clojure dcb523b 191/313: Avoid computing completion bounds when no valid chars are at point |
Date: |
Wed, 11 Aug 2021 10:00:14 -0400 (EDT) |
branch: elpa/inf-clojure
commit dcb523bf8bd21189e18a6751a8c2d3e1a698573d
Author: Andrea Richiardi <a.richiardi.work@gmail.com>
Commit: Bozhidar Batsov <bozhidar.batsov@gmail.com>
Avoid computing completion bounds when no valid chars are at point
For instance we want to avoid using substring-no-properties while typing
^| (where | is point) because it will error out.
---
inf-clojure.el | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/inf-clojure.el b/inf-clojure.el
index 8c5befd..127ff9c 100644
--- a/inf-clojure.el
+++ b/inf-clojure.el
@@ -1352,9 +1352,11 @@ you might want to use in your customization."
(save-excursion
(let ((end (point)))
(skip-chars-backward (concat "^" inf-clojure-clojure-expr-break-chars))
- (let ((first-char (substring-no-properties (thing-at-point 'symbol) 0
1)))
- (when (string-match-p "[^0-9]" first-char)
- (cons (point) end)))))))
+ (let ((chars (thing-at-point 'symbol)))
+ (when (> (length chars) 0)
+ (let ((first-char (substring-no-properties chars 0 1)))
+ (when (string-match-p "[^0-9]" first-char)
+ (cons (point) end)))))))))
(defun inf-clojure-completion-expr-at-point ()
"Return expression at point to complete."
- [nongnu] elpa/inf-clojure 3a93815 170/313: [Fix #105] Add planck-specific function for show-arglist (#106), (continued)
- [nongnu] elpa/inf-clojure 3a93815 170/313: [Fix #105] Add planck-specific function for show-arglist (#106), ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 204e5b7 114/313: Do some cleanup in preparation for a major release, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure d81e266 116/313: [Fix #48] Stop prompting for the symbol at point by default (#51), ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 431c068 127/313: Fix three "variable is void" bugs, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 723064d 151/313: [Fix #83] Harden parsing of repl responses (#85), ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure a705085 152/313: Add nil parameter to lumo completions' atom, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure f7ec13a 160/313: Improve performance of inf-clojure--process-response and close #89, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 12583f4 175/313: Add :safe clause for inf-clojure-repl-use-same-window, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 247ca70 182/313: Release 2.1.0, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 62bb0fc 186/313: Update CHANGELOG.md, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure dcb523b 191/313: Avoid computing completion bounds when no valid chars are at point,
ELPA Syncer <=
- [nongnu] elpa/inf-clojure 1507faa 119/313: Add dir support in Lumo, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure ff72d66 236/313: [Fix #171] Release 2.2.0, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure ac40726 241/313: Move all repl stuff into single nested alist, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 24121e5 246/313: Add babashka repl and readme cleanups, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 977e176 258/313: Mark this package as not part of Emacs, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 4af94e6 271/313: Fixed two checkdoc warnings, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 62abe4e 278/313: Add Emacs 27 to the CI matrix, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure fd2d774 283/313: Bump the development version, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure dd7dd78 304/313: Tweak a couple of docstrings, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 1e99b82 306/313: The redundant bit of code was actually required (#191), ELPA Syncer, 2021/08/11