Skip to content

Commit 7349c49

Browse files
committed
[lsp-ui-sideline] Avoid unnecessary computations for the position
lsp--cur-column uses line-begining-position which can be slow on big file.
1 parent 36db875 commit 7349c49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lsp-ui-sideline.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ to the language server."
424424
(outside-comment (eq (nth 4 parsing-state) nil)))
425425
;; Skip strings and comments
426426
(when (and symbol (not in-string) outside-comment)
427-
(push (list symbol tag bounds (lsp--position (1- line-widen) (lsp--cur-column))) symbols))))
427+
(push (list symbol tag bounds (lsp--position (1- line-widen) (- (point) bol))) symbols))))
428428
(dolist (entry symbols)
429429
(-let [(symbol tag bounds position) entry]
430430
(lsp--send-request-async

0 commit comments

Comments
 (0)