From 7b3f18e1dfe04f2f953af4d6ad0eeb3b34bff8da Mon Sep 17 00:00:00 2001 From: Andy Stewart Date: Sun, 3 Nov 2024 11:23:49 +0800 Subject: [PATCH] Fix nil error when type org-insert-self-command. --- lsp-bridge.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lsp-bridge.el b/lsp-bridge.el index ecac4d8657..c18ee2a581 100644 --- a/lsp-bridge.el +++ b/lsp-bridge.el @@ -1585,8 +1585,10 @@ So we build this macro to restore postion after code format." (defun lsp-bridge--not-match-hide-keywords () "Hide completion if string before cursor match some special keywords." - (let ((string (buffer-substring-no-properties (car (bounds-of-thing-at-point 'symbol)) - (point)))) + (let ((string (if (bounds-of-thing-at-point 'symbol) + (buffer-substring-no-properties (car (bounds-of-thing-at-point 'symbol)) + (point)) + (char-to-string (char-before))))) (not (when (and (or (derived-mode-p 'ruby-mode) (derived-mode-p 'ruby-ts-mode) (derived-mode-p 'elixir-mode)