branch: master
commit d592e36f33ac7e1fece462c5b7157f330c732630
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
ace-window.el (aw--lead-overlay): Work around args-out-of-range
Re #31
---
ace-window.el | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/ace-window.el b/ace-window.el
index 3534160..68e28cf 100644
--- a/ace-window.el
+++ b/ace-window.el
@@ -171,8 +171,11 @@ LEAF is (PT . WND)."
(let* ((pt (car leaf))
(wnd (cdr leaf))
(ol (make-overlay pt (1+ pt) (window-buffer wnd)))
- (old-str (with-selected-window wnd
- (buffer-substring pt (1+ pt))))
+ (old-str (or
+ (ignore-errors
+ (with-selected-window wnd
+ (buffer-substring pt (1+ pt))))
+ ""))
(new-str
(concat
(cl-case aw-leading-char-style