Skip to content

Commit

Permalink
v0.0.38: Critical bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
subnut committed Jan 6, 2021
1 parent 62cc57b commit 309844a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .binary_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.0.37
v0.0.38
14 changes: 6 additions & 8 deletions binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from simple_websocket_server import WebSocket
from simple_websocket_server import WebSocketServer

BUILD_VERSION: str = "v0.0.37"
BUILD_VERSION: str = "v0.0.38"

# TEMP_FILEPATH is used to store the port of the currently running server
TEMP_FILEPATH: str = os.path.join(tempfile.gettempdir(), "nvim-ghost.nvim.port")
Expand Down Expand Up @@ -178,14 +178,12 @@ def _ghost_responder(self):
if neovim_focused_address is None:
# There's no neovim instance to handle our request
return
payload = (
"""\
{
# In f-strings, to insert literal {, we need to escape it using another {
# So {{ translates to a single literal {
payload = f"""{{
"ProtocolVersion": 1,
"WebSocketPort": {%s}
}"""
% servers.websocket_server.port
)
"WebSocketPort": {servers.websocket_server.port}
}}"""
self.send_response(200)
self.send_header("Content-Type", "application/json")
self.end_headers()
Expand Down

0 comments on commit 309844a

Please sign in to comment.