Skip to content

Commit

Permalink
lsp: Fix subtle lsp bugs (#1340)
Browse files Browse the repository at this point in the history
  • Loading branch information
V-FEXrt authored Jul 10, 2023
1 parent d6491ff commit eda9dea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/lsp-wake/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class LSPServer {
};

MethodResult processRequest(const std::string &requestString) {
wcl::log::info(requestString.c_str())({{"rpc", "rx"}});
wcl::log::info("%s", requestString.c_str())({{"rpc", "rx"}});

// Parse that requestString as JSON
JAST request;
Expand Down Expand Up @@ -202,7 +202,7 @@ class LSPServer {
"Please change the path in the extension settings and reload the window by: " +
" 1. Opening the command palette (Ctrl + Shift + P); " +
" 2. Typing \"> Reload Window\" and executing (Enter);";
showMessageParams.add("rpc", messageText.c_str());
showMessageParams.add("message", messageText.c_str());
methodResult.notification = message;
}

Expand Down Expand Up @@ -310,7 +310,7 @@ class LSPServer {

std::string msg = str.str();

wcl::log::info(msg.c_str())({{"rpc", "tx"}});
wcl::log::info("%s", msg.c_str())({{"rpc", "tx"}});

if (msg == "{}") {
wcl::log::warning("Throwing away empty response message")();
Expand Down

0 comments on commit eda9dea

Please sign in to comment.