[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 7457d1e 169/348: Add leading zeros to the hex representati
From: |
Oleh Krehel |
Subject: |
[elpa] master 7457d1e 169/348: Add leading zeros to the hex representation to counsel-unicode-char |
Date: |
Sat, 8 Apr 2017 11:03:49 -0400 (EDT) |
branch: master
commit 7457d1e5e70379892f902e80628ab3fc51327dfd
Author: mn1281 <address@hidden>
Commit: Oleh Krehel <address@hidden>
Add leading zeros to the hex representation to counsel-unicode-char
Unicode hex codes typically have leading 0s, and this change also makes
searching by hex code easier.
Sort results. With the leading zeros in place, sorting is in correct
numerical order.
Fixes #662
---
counsel.el | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/counsel.el b/counsel.el
index d091ce8..fecfc7d 100644
--- a/counsel.el
+++ b/counsel.el
@@ -352,13 +352,14 @@ Update the minibuffer with the amount of lines collected
every
(defun counsel-unicode-char ()
"Insert a Unicode character at point."
(interactive)
- (let ((minibuffer-allow-text-properties t))
+ (let ((minibuffer-allow-text-properties t)
+ (ivy-sort-max-size (expt 256 6)))
(setq ivy-completion-beg (point))
(setq ivy-completion-end (point))
(ivy-read "Unicode name: "
(mapcar (lambda (x)
(propertize
- (format "% -6X% -60s%c" (cdr x) (car x) (cdr x))
+ (format "%06X % -60s%c" (cdr x) (car x) (cdr x))
'result (cdr x)))
(ucs-names))
:action (lambda (char)
@@ -367,7 +368,8 @@ Update the minibuffer with the amount of lines collected
every
(setq ivy-completion-beg (point))
(insert-char (get-text-property 0 'result char))
(setq ivy-completion-end (point))))
- :history 'counsel-unicode-char-history)))
+ :history 'counsel-unicode-char-history
+ :sort t)))
;;* Elisp symbols
;;** `counsel-describe-variable'
- [elpa] master 413bf7f 135/348: ivy.el: Prevent region expanding to prompt, (continued)
- [elpa] master 413bf7f 135/348: ivy.el: Prevent region expanding to prompt, Oleh Krehel, 2017/04/08
- [elpa] master b49ed2f 140/348: ivy.el (ivy--reset-state): Add stringp preselect guard, Oleh Krehel, 2017/04/08
- [elpa] master a2ed614 138/348: ivy.el (ivy-occur-mode-map): Make "RET" switch window, Oleh Krehel, 2017/04/08
- [elpa] master 80db2cc 142/348: ivy-test.el (ivy-read-preselect): New test, Oleh Krehel, 2017/04/08
- [elpa] master 61c2b12 125/348: counsel-git-grep now supports custom per-project commands, Oleh Krehel, 2017/04/08
- [elpa] master 434ccce 150/348: swiper.el (swiper-font-lock-exclude): Add bookmark-bmenu-mode, Oleh Krehel, 2017/04/08
- [elpa] master 242ae95 148/348: ivy.el (ivy--reset-state): Fix read-only collection member, Oleh Krehel, 2017/04/08
- [elpa] master a99c125 161/348: counsel.el (counsel-grep): Specify :re-builder, Oleh Krehel, 2017/04/08
- [elpa] master 4e6145c 168/348: counsel.el (counsel-yank-pop-separator): New defcustom, Oleh Krehel, 2017/04/08
- [elpa] master b73264e 163/348: counsel.el (counsel-git-log-cmd): New defvar, Oleh Krehel, 2017/04/08
- [elpa] master 7457d1e 169/348: Add leading zeros to the hex representation to counsel-unicode-char,
Oleh Krehel <=
- [elpa] master 8983f9d 167/348: counsel.el (counsel-recentf): Turn on recentf, Oleh Krehel, 2017/04/08
- [elpa] master 6961df6 166/348: doc/ivy.org: Replace swiper with counsel (MELPA), Oleh Krehel, 2017/04/08
- [elpa] master 3656dfe 171/348: ivy.el (ivy-exit-with-action): Remove with-ivy-window, Oleh Krehel, 2017/04/08
- [elpa] master 4c3ecb4 157/348: Restore window position after using swiper., Oleh Krehel, 2017/04/08
- [elpa] master 94f3368 160/348: Extract ivy--flx-propertize from ivy--flx-sort, Oleh Krehel, 2017/04/08
- [elpa] master 6b574e4 173/348: ivy.el (ivy-call): expand-file-name, Oleh Krehel, 2017/04/08
- [elpa] master 93f9321 174/348: ivy.el: Fix byte compiler warnings, Oleh Krehel, 2017/04/08
- [elpa] master 2a9c3f3 191/348: swiper.el (swiper-multi): Don't use virtual buffers, Oleh Krehel, 2017/04/08
- [elpa] master 3a7c8cd 189/348: counsel.el (counsel-recentf): add extra actions, Oleh Krehel, 2017/04/08
- [elpa] master 955585e 190/348: counsel.el (counsel-describe-face): Ensure :preselect string, Oleh Krehel, 2017/04/08