0

I like the hollow option because I know where the cursor is when I switch windows. I use ace-window to change windows. My problem is the ace character is difficult to read when the hollow cursor is on the first character and first line of the frame. Is there any good way to change cursor-in-non-selected-windows to nil when the cursor is on the first char of the first line.

(setq-default cursor-in-non-selected-windows 'hollow)  
  • How about tweaking ace-window to use a different setting for cursor-in-non-selected-windows (on a temporary basis while it is active) instead of trying to figure out what is in a particular buffer (e.g., first char of the first line)? – lawlist Feb 28 '17 at 21:11
  • I like that idea a lot! I'm not sure how to go about it, but I will try to look into it. If you know how please share. – eflanigan00 Feb 28 '17 at 21:25
  • I'm not familiar with ace-window (other than the name for such a popular library), but here is one method of how a temporary binding could work: (let ((cursor-in-non-selected-windows '(hbar . 1))) [do your stuff]) If a particular mode has set the variable on a buffer-local basis, then you may need to get a little fancier by using something like (with-current-buffer BUFFER (let ((cursor-in-non-selected-windows '(hbar . 1))) [do your stuff])) – lawlist Feb 28 '17 at 23:21
  • Another option is to customize aw-leading-char-face to make it more visible. For example, M-x customize-face aw-leading-char-face and set the height attribute to 2.5 to make it bigger. – glucas Mar 1 '17 at 15:01
1

abo-abo provided the answer on the ace-window github page. advice is definitely the way to go. Thank you abo-abo!

(define-advice aw-select (:around (fun &rest r) cursor-stuff)
  (let ((cursor-in-non-selected-windows nil))
    (apply fun r)))
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.