File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -174,9 +174,17 @@ Switch to current mouse interacting window before doing BODY."
174
174
(lsp-headerline--go-to-symbol symbol)))
175
175
(define-key map [header-line mouse-2]
176
176
(lsp-headerline--make-mouse-handler
177
- (lsp-headerline--narrow-to-symbol symbol)))
177
+ (-let (((&DocumentSymbol :range (&RangeToPoint :start :end )) symbol))
178
+ (if (and (eq (point-min ) start) (eq (point-max ) end))
179
+ (widen )
180
+ (lsp-headerline--narrow-to-symbol symbol)))))
178
181
map)
179
- (format " mouse-1: go to '%s ' symbol\n mouse-2: narrow to '%s ' range " name name)
182
+ (format " mouse-1: go to '%s ' symbol\n mouse-2: %s "
183
+ name
184
+ (-let (((&DocumentSymbol :range (&RangeToPoint :start :end )) symbol))
185
+ (if (and (eq (point-min ) start) (eq (point-max ) end))
186
+ " widen"
187
+ (format " narrow to '%s ' range " name))))
180
188
symbol-display-string))
181
189
182
190
(defun lsp-headerline--path-up-to-project-root (root-path path )
You can’t perform that action at this time.
0 commit comments