1

I have configured helm to hide the minibuffer and show the input in the header line following this instructions.

The relevant code is this:

(defun helm-hide-minibuffer-maybe ()
  (when (with-helm-buffer helm-echo-input-in-header-line)
    (let ((ov (make-overlay (point-min) (point-max) nil nil t)))
      (overlay-put ov 'window (selected-window))
      (overlay-put ov 'face (let ((bg-color (face-background 'default nil)))
                              `(:background ,bg-color :foreground ,bg-color)))
      (setq-local cursor-type nil))))

(add-hook 'helm-minibuffer-set-up-hook 'helm-hide-minibuffer-maybe)

I want the cursor-type to be of type 'bar but setting this in the code above just yields an additional cursor with type 'bar in the minibuffer. The cursor in the helm header line is still a 'box. How to solve this?

  • 1
    I think the "cursor* in header line is fake (use something like (propertize " " 'face 'cursor)), the real cursor still is in minibuffer, so change that text properties (from function helm--set-header-line) instead of cursor-type. – xuchunyang Oct 1 '15 at 16:35
  • Related issue github.com/emacs-helm/helm/issues/1198 – xuchunyang Oct 1 '15 at 17:04
0

It turns out that changing the appearance of the cursor to a bar is not possible [reference]. If one really don't want a box an underline is possible instead. For this change the relevant part inhelm--set-header-line function to this:

(put-text-property
 ;; Increment pos to handle the space before prompt (i.e `pref').
 (1+ pos) (+ 2 pos)
 'face 'underline header-line-format)

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.