File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -484,11 +484,18 @@ mouse-1: Switch project"
484
484
(defun jcs-modeline--render-read-only ()
485
485
" Render read-only indicator."
486
486
(concat " "
487
- (if buffer-read-only
488
- (or (jcs-modeline--char-displayable-p " 🔒" )
489
- " &L" )
490
- (or (jcs-modeline--char-displayable-p " 🔓" )
491
- " &U" ))))
487
+ (propertize (if buffer-read-only
488
+ (or (jcs-modeline--char-displayable-p " 🔒" )
489
+ " &L" )
490
+ (or (jcs-modeline--char-displayable-p " 🔓" )
491
+ " &U" ))
492
+ 'mouse-face 'mode-line-highlight
493
+ 'help-echo (format " Buffer read-only: %s "
494
+ (if buffer-read-only " ON" " OFF" ))
495
+ 'local-map
496
+ (let ((map (make-sparse-keymap )))
497
+ (define-key map (vector 'mode-line 'mouse-1 ) #'read-only-mode )
498
+ map))))
492
499
493
500
; ;
494
501
; ;; Text Scale
You can’t perform that action at this time.
0 commit comments