File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -103,9 +103,10 @@ Results are meaningful only if FROM and TO are on the same line."
103
103
" Find or create a lens for the line at POS."
104
104
(-doto (save-excursion
105
105
(goto-char pos)
106
- (if (eq 'end-of-line lsp-lens-place-position)
107
- (make-overlay (line-end-position ) -1 nil t t )
108
- (make-overlay (line-beginning-position ) (1+ (line-end-position )) nil t t )))
106
+ (let ((eol (line-end-position )))
107
+ (if (eq 'end-of-line lsp-lens-place-position)
108
+ (make-overlay eol eol nil t t )
109
+ (make-overlay (line-beginning-position ) (1+ eol) nil t t ))))
109
110
(overlay-put 'lsp-lens t )
110
111
(overlay-put 'lsp-lens-position pos)))
111
112
Original file line number Diff line number Diff line change @@ -862,6 +862,6 @@ line 3 words here and here
862
862
(should (string-match-p " My command"
863
863
(overlay-get (car lenses) 'after-string )))
864
864
(goto-char (overlay-start (car lenses)))
865
- (should (equal (line-number-at-pos ) (- line 1 )))))))
865
+ (should (equal (line-number-at-pos ) (+ line 1 )))))))
866
866
867
867
; ;; lsp-mock-server-test.el ends here
You can’t perform that action at this time.
0 commit comments