Convert to method chaining syntax

This commit is contained in:
Jared Miller 2026-01-27 21:43:15 -05:00
parent 6138168af0
commit fe368edd74
Signed by: shmup
GPG key ID: 22B5C6D66A38B06C

View file

@ -27,7 +27,7 @@ def Send(msg: dict<any>): void
enddef enddef
def OnOutput(ch: channel, msg: string): void def OnOutput(ch: channel, msg: string): void
if empty(msg) if msg->empty()
return return
endif endif
var data: dict<any> var data: dict<any>
@ -61,7 +61,7 @@ def ApplyRemoteContent(content: string): void
return return
endif endif
suppressing = true suppressing = true
var lines = split(content, "\n", true) var lines = content->split("\n", true)
var view = winsaveview() var view = winsaveview()
silent! :%delete _ silent! :%delete _
setline(1, lines) setline(1, lines)
@ -74,7 +74,7 @@ def SendBuffer(): void
return return
endif endif
var lines = getline(1, '$') var lines = getline(1, '$')
var content = join(lines, "\n") var content = lines->join("\n")
Send({type: 'content', text: content}) Send({type: 'content', text: content})
enddef enddef