[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 9346e96 194/348: Improve the overlay offset
From: |
Oleh Krehel |
Subject: |
[elpa] master 9346e96 194/348: Improve the overlay offset |
Date: |
Sat, 8 Apr 2017 11:03:55 -0400 (EDT) |
branch: master
commit 9346e9669cb9cd6bf52507428ef9339c28c03718
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Improve the overlay offset
* ivy-overlay.el (ivy-display-function-overlay): Update.
1. When in `org-mode' take into account `org-indent-mode'.
2. When completing a prefix, place it so that it lines up with existing
text. For example, in an Elisp buffer type "org-" and press "C-M-i". The
candidates will all start with "org-" and now will line up with the
"org-" that's already in the buffer. Instead of just being aligned to
the current point.
---
ivy-overlay.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/ivy-overlay.el b/ivy-overlay.el
index 7a45137..e74e486 100644
--- a/ivy-overlay.el
+++ b/ivy-overlay.el
@@ -69,7 +69,12 @@ Hide the minibuffer contents and cursor."
(buffer-substring (1- (point)) (point))
ivy-text
(buffer-substring (point) (line-end-position))
- (ivy-left-pad str (current-column))))))
+ (ivy-left-pad str
+ (+ (if (eq major-mode 'org-mode)
+ (* org-indent-indentation-per-level
(org-current-level))
+ 0)
+ (- ivy-completion-beg ivy-completion-end)
+ (current-column)))))))
(provide 'ivy-overlay)
;;; ivy-overlay.el ends here
- [elpa] master 90aaf8b 307/348: ivy.el (ivy-completing-read): Set :caller to this-command, (continued)
- [elpa] master 90aaf8b 307/348: ivy.el (ivy-completing-read): Set :caller to this-command, Oleh Krehel, 2017/04/08
- [elpa] master e9219e7 313/348: ivy-hydra.el: Use ivy-minibuffer-map, Oleh Krehel, 2017/04/08
- [elpa] master 7f5b268 311/348: ivy-hydra.el: Add an alternative "M-o" using hydra, Oleh Krehel, 2017/04/08
- [elpa] master beffa78 323/348: counsel.el (counsel-grep-base-command): Single quote regex, Oleh Krehel, 2017/04/08
- [elpa] master 7b453c8 329/348: ivy.el (ivy-completion-in-region-action): Work for cons cells, Oleh Krehel, 2017/04/08
- [elpa] master 1e739de 331/348: ivy-overlay.el (ivy-left-pad): Trim cands to window-width, Oleh Krehel, 2017/04/08
- [elpa] master 16b002a 343/348: doc/Changelog.org: Link all issues, Oleh Krehel, 2017/04/08
- [elpa] master e1351c8 348/348: Merge commit 'ace01d5603ddf49b025eb811b612af72ec38dcfb' from swiper, Oleh Krehel, 2017/04/08
- [elpa] master 3ce73ce 069/348: counsel.el (counsel-company): Enable company-mode, Oleh Krehel, 2017/04/08
- [elpa] master 61cdcd5 139/348: ivy.el (ivy-occur-press-and-switch): Use ivy-occur-last, Oleh Krehel, 2017/04/08
- [elpa] master 9346e96 194/348: Improve the overlay offset,
Oleh Krehel <=
- [elpa] master 6644d8e 195/348: ivy-display.el: Move to wiki, Oleh Krehel, 2017/04/08
- [elpa] master e49fb6e 205/348: ivy.el (ivy-call): Set default-directory, Oleh Krehel, 2017/04/08
- [elpa] master 714cb8c 209/348: ivy.el (ivy--sort-files-by-date): Fix docstring, Oleh Krehel, 2017/04/08
- [elpa] master 0fc1507 237/348: ivy.el (ivy-occur-mode): Set view-read-only to nil locally, Oleh Krehel, 2017/04/08
- [elpa] master ea260d1 249/348: counsel.el (counsel-grep-occur): Quote the directory name, Oleh Krehel, 2017/04/08
- [elpa] master 3b15585 256/348: Fix little typo, Oleh Krehel, 2017/04/08
- [elpa] master 7dea0ff 255/348: Use ivy-format-function approach for counsel-faces, Oleh Krehel, 2017/04/08
- [elpa] master 2989f25 268/348: swiper.el (swiper--update-input-ivy): Fix window-end call, Oleh Krehel, 2017/04/08
- [elpa] master c2c0e2d 270/348: ivy.el: Simplify previous commit, Oleh Krehel, 2017/04/08
- [elpa] master 75f9ceb 286/348: Allow spaces in file names when running linux apps., Oleh Krehel, 2017/04/08