Skip to content

Commit

Permalink
Slight refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
alexherbo2 committed Sep 10, 2021
1 parent 899bcd4 commit ae8f761
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/kakoune/cli.cr
Original file line number Diff line number Diff line change
Expand Up @@ -478,11 +478,13 @@ module Kakoune::CLI
end

buffer_names = options.buffer_names + argv
session = options.context.session
client = options.context.client

buffer_contents = if buffer_names.empty?
[options.context.client.current_buffer.content]
[client.current_buffer.content]
else
buffer_names.map { |name| options.context.session.buffer(name).content }
buffer_names.map { |name| session.buffer(name).content }
end

if options.raw
Expand Down

0 comments on commit ae8f761

Please sign in to comment.