Skip to content

Commit d92cf83

Browse files
committed
Remove the usage of lsp--cur-line and lsp--cur-position
1 parent 2c3191c commit d92cf83

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lsp-ui.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ Both should have the form (FILENAME LINE COLUMN)."
135135
(defun lsp-ui-find-next-reference (&optional extra)
136136
"Find next reference of the symbol at point."
137137
(interactive)
138-
(let* ((cur (list buffer-file-name (lsp--cur-line) (lsp--cur-column)))
138+
(let* ((cur (list buffer-file-name (line-number-at-pos) (- (point) (line-beginning-position))))
139139
(refs (lsp-ui--reference-triples extra))
140140
(idx -1)
141141
(res (-first (lambda (ref) (cl-incf idx) (lsp-ui--location< cur ref)) refs)))
@@ -152,7 +152,7 @@ Both should have the form (FILENAME LINE COLUMN)."
152152
(defun lsp-ui-find-prev-reference (&optional extra)
153153
"Find previous reference of the symbol at point."
154154
(interactive)
155-
(let* ((cur (list buffer-file-name (lsp--cur-line) (lsp--cur-column)))
155+
(let* ((cur (list buffer-file-name (line-number-at-pos) (- (point) (line-beginning-position))))
156156
(refs (lsp-ui--reference-triples extra))
157157
(idx -1)
158158
(res (-last (lambda (ref) (and (lsp-ui--location< ref cur) (cl-incf idx))) refs)))

0 commit comments

Comments
 (0)