-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use the paste file in conemu for faster turnaround #446
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,11 +9,8 @@ function! slime#targets#conemu#config() abort | |
endfunction | ||
|
||
function! slime#targets#conemu#send(config, text) | ||
" use the selection register to send text to ConEmu using the windows clipboard (see help gui-clipboard) | ||
" save the current selection to restore it after send | ||
let tmp = @* | ||
let @* = a:text | ||
call slime#common#system("conemuc -guimacro:%s print", [a:config["HWND"]]) | ||
let @* = tmp | ||
" Use the selection register to send text to ConEmu using the slime paste file | ||
let paste_file = slime#common#write_paste_file(a:text) | ||
call slime#common#system("conemuc -guimacro:%s pastefile 2 %s", [a:config["HWND"], paste_file]) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. all in all, I'm surprised that using the pastefile would be faster than the clipboard … 🤔
That wasn't my understanding of
? another concern is that the pastefile sticks around, holding on to your last slime send — I'm not sure everybody feels comfortable with that, so I've been avoiding it when possible (only |
||
endfunction | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my initial reaction was
resolve
is probably too fast to benchmark (it's not in some inner loop) 🤔but looking at the call sites, it wouldn't hurt to return
paste_file
-- so I think I'm OK with that 👍I like checking for a
writefile
error, how about avoiding theresult
var? (it's only used for theif
)