Convert string concatenation to interpolation
This commit is contained in:
parent
a7c84ed9d5
commit
6138168af0
1 changed files with 4 additions and 4 deletions
|
|
@ -41,14 +41,14 @@ def OnOutput(ch: channel, msg: string): void
|
||||||
ready = true
|
ready = true
|
||||||
elseif data.type == 'connected'
|
elseif data.type == 'connected'
|
||||||
connected = true
|
connected = true
|
||||||
echom '[collab] connected to room: ' .. data.room
|
echom $'[collab] connected to room: {data.room}'
|
||||||
elseif data.type == 'disconnected'
|
elseif data.type == 'disconnected'
|
||||||
connected = false
|
connected = false
|
||||||
echom '[collab] disconnected'
|
echom '[collab] disconnected'
|
||||||
elseif data.type == 'content'
|
elseif data.type == 'content'
|
||||||
ApplyRemoteContent(data.text)
|
ApplyRemoteContent(data.text)
|
||||||
elseif data.type == 'peers'
|
elseif data.type == 'peers'
|
||||||
echom '[collab] peers: ' .. data.count
|
echom $'[collab] peers: {data.count}'
|
||||||
elseif data.type == 'cursor'
|
elseif data.type == 'cursor'
|
||||||
ShowPeerCursor(data.data)
|
ShowPeerCursor(data.data)
|
||||||
elseif data.type == 'error'
|
elseif data.type == 'error'
|
||||||
|
|
@ -100,7 +100,7 @@ def ShowPeerCursor(data: dict<any>): void
|
||||||
const col_nr = data.col + 1
|
const col_nr = data.col + 1
|
||||||
|
|
||||||
# Create a 1-char highlight at cursor position
|
# Create a 1-char highlight at cursor position
|
||||||
const pattern = '\%' .. line_nr .. 'l\%' .. col_nr .. 'c.'
|
const pattern = $'\%{line_nr}l\%{col_nr}c.'
|
||||||
peer_match_ids[client_id] = matchadd('PeerCursor', pattern, 10)
|
peer_match_ids[client_id] = matchadd('PeerCursor', pattern, 10)
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
|
|
@ -167,7 +167,7 @@ enddef
|
||||||
|
|
||||||
export def Status(): void
|
export def Status(): void
|
||||||
if connected
|
if connected
|
||||||
echom '[collab] connected to room: ' .. room
|
echom $'[collab] connected to room: {room}'
|
||||||
else
|
else
|
||||||
echom '[collab] not connected'
|
echom '[collab] not connected'
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue