From ade17749212894e5b472892b609204a69209eb81 Mon Sep 17 00:00:00 2001 From: Colin Fraizer Date: Sat, 15 Aug 2020 18:53:39 -0400 Subject: [PATCH 1/2] Allow lsp-ui-doc-max-width to be nil for frame-width --- lsp-ui-doc.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lsp-ui-doc.el b/lsp-ui-doc.el index 66a9a383..e493fbf5 100644 --- a/lsp-ui-doc.el +++ b/lsp-ui-doc.el @@ -93,7 +93,7 @@ This only takes effect when `lsp-ui-doc-position' is 'top or 'bottom." :group 'lsp-ui-doc) (defcustom lsp-ui-doc-max-width 150 - "Maximum number of columns of the frame." + "Maximum number of columns of the frame or nil for ``frame-width''." :type 'integer :group 'lsp-ui-doc) @@ -411,6 +411,7 @@ We don't extract the string that `lps-line' is already displaying." 'lsp-ui-doc--webkit-resize-callback) (let* ((frame-width (frame-width)) + (lsp-ui-doc-max-width (or lsp-ui-doc-max-width frame-width)) (fill-column (min lsp-ui-doc-max-width (- frame-width 5)))) (when (> (lsp-ui-doc--buffer-width) (min lsp-ui-doc-max-width frame-width)) (lsp-ui-doc--with-buffer From e441ff1043c517726a97e48c2f79ac48c380827b Mon Sep 17 00:00:00 2001 From: Colin Fraizer Date: Tue, 17 Nov 2020 04:08:32 -0500 Subject: [PATCH 2/2] Update lsp-ui-doc.el Co-authored-by: Jen-Chieh Shen --- lsp-ui-doc.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lsp-ui-doc.el b/lsp-ui-doc.el index e493fbf5..b0710817 100644 --- a/lsp-ui-doc.el +++ b/lsp-ui-doc.el @@ -93,7 +93,7 @@ This only takes effect when `lsp-ui-doc-position' is 'top or 'bottom." :group 'lsp-ui-doc) (defcustom lsp-ui-doc-max-width 150 - "Maximum number of columns of the frame or nil for ``frame-width''." + "Maximum number of columns of the frame or nil for `frame-width'." :type 'integer :group 'lsp-ui-doc)