@@ -460,6 +460,10 @@ We don't extract the string that `lps-line' is already displaying."
460
460
(xwidget-resize (lsp-ui-doc--webkit-get-xwidget) offset-width offset-height))
461
461
(lsp-ui-doc--move-frame (lsp-ui-doc--get-frame)))
462
462
463
+ (defun lsp-ui-doc--scale-column-width (width )
464
+ " Return WIDTH adjusted relative to the text scale."
465
+ (floor (/ width (expt 1.1 lsp-ui-doc-text-scale-level))))
466
+
463
467
(defun lsp-ui-doc--resize-buffer ()
464
468
" If the buffer's width is larger than the current frame, resize it."
465
469
(if lsp-ui-doc-use-webkit
@@ -468,7 +472,7 @@ We don't extract the string that `lps-line' is already displaying."
468
472
'lsp-ui-doc--webkit-resize-callback )
469
473
470
474
(let* ((frame-width (frame-width ))
471
- (fill-column (min lsp-ui-doc-max-width (- frame-width 5 ))))
475
+ (fill-column (lsp-ui-doc--scale-column-width ( min lsp-ui-doc-max-width (- frame-width 5 ) ))))
472
476
(when (> (lsp-ui-doc--buffer-width) (min lsp-ui-doc-max-width frame-width))
473
477
(lsp-ui-doc--with-buffer
474
478
(fill-region (point-min ) (point-max )))))))
@@ -618,7 +622,7 @@ FN is the function to call on click."
618
622
619
623
(defun lsp-ui-doc--fill-document ()
620
624
" Better wrap the document so it fits the doc window."
621
- (let ((fill-column (- lsp-ui-doc-max-width 5 ))
625
+ (let ((fill-column (lsp-ui-doc--scale-column-width ( - lsp-ui-doc-max-width 5 ) ))
622
626
start ; record start for `fill-region'
623
627
first-line) ; first line in paragraph
624
628
(save-excursion
0 commit comments