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
|
||||
elseif data.type == 'connected'
|
||||
connected = true
|
||||
echom '[collab] connected to room: ' .. data.room
|
||||
echom $'[collab] connected to room: {data.room}'
|
||||
elseif data.type == 'disconnected'
|
||||
connected = false
|
||||
echom '[collab] disconnected'
|
||||
elseif data.type == 'content'
|
||||
ApplyRemoteContent(data.text)
|
||||
elseif data.type == 'peers'
|
||||
echom '[collab] peers: ' .. data.count
|
||||
echom $'[collab] peers: {data.count}'
|
||||
elseif data.type == 'cursor'
|
||||
ShowPeerCursor(data.data)
|
||||
elseif data.type == 'error'
|
||||
|
|
@ -100,7 +100,7 @@ def ShowPeerCursor(data: dict<any>): void
|
|||
const col_nr = data.col + 1
|
||||
|
||||
# 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)
|
||||
enddef
|
||||
|
||||
|
|
@ -167,7 +167,7 @@ enddef
|
|||
|
||||
export def Status(): void
|
||||
if connected
|
||||
echom '[collab] connected to room: ' .. room
|
||||
echom $'[collab] connected to room: {room}'
|
||||
else
|
||||
echom '[collab] not connected'
|
||||
endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue