File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 262262 (interactive )
263263 (-when-let* ((workspace lsp--cur-workspace)
264264 (node (cquery-tree--node-at-point))
265- (win ( get-buffer-window cquery-tree--origin-buffer )))
266- (with-selected-window win
265+ (_ ( window-live-p cquery-tree--origin-win )))
266+ (with-selected-window cquery-tree--origin- win
267267 (when split-fn
268268 (funcall split-fn))
269269 (find-file (car (cquery-tree-node-location node)))
281281 " Switch window and jump to the location."
282282 (interactive )
283283 (cquery-tree-press)
284- (when-let* ((win ( get-buffer-window cquery-tree--origin-buffer)) )
285- (select-window win)))
284+ (when ( window-live-p cquery-tree--origin-win )
285+ (select-window cquery-tree--origin- win)))
286286
287287(defun cquery-tree-press-and-horizontal-split ()
288288 " Split window horizontally and jump to the location."
289289 (interactive )
290290 (cquery-tree-press #'split-window-horizontally )
291- (when-let* ((win ( get-buffer-window cquery-tree--origin-buffer)) )
292- (select-window win)))
291+ (when ( window-live-p cquery-tree--origin-win )
292+ (select-window cquery-tree--origin- win)))
293293
294294(defun cquery-tree-press-and-vertical-split ()
295295 " Split window vertically and jump to the location."
296296 (interactive )
297297 (cquery-tree-press #'split-window-vertically )
298- (when-let* ((win ( get-buffer-window cquery-tree--origin-buffer)) )
299- (select-window win)))
298+ (when ( window-live-p cquery-tree--origin-win )
299+ (select-window cquery-tree--origin- win)))
300300
301301(defun cquery-tree-next-line (&optional arg )
302302 (interactive " p" )
You can’t perform that action at this time.
0 commit comments