Skip to content
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

possible fix for #239 #240

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

possible fix for #239 #240

wants to merge 2 commits into from

Conversation

MarcMush
Copy link
Contributor

adds a keybind (ctrl-V but we could change) to paste directly

by using InteractiveUtils.clipboard()

allows nearly instant paste in julia 1.5 and it feels truly instant in julia 1.6

doesn't work in WSL (need to install xsel or xclip)

This is a quick fix I did when I discovered clipboard() today, I don't know much about it, feel free to do it differently

It might also allow to re-enable enable_autocomplete_brackets which was disabled due to #113

@MarcMush
Copy link
Contributor Author

I really feel this should be added to OhMyREPL (maybe with another keybind, and only for windows users)

or, alternatively, fix it the same way it has been in julia 1.7? it has been improved, but it's still not great, even without OhMyREPL. With OhMyREPL however, it's still horribly slow

each time I load julia with --startup-file no (which means I don't have the fix from #239 (comment)), I slightly die inside when I have to paste something

I can't imagine any windows user using OhMyREPL in the current state

@KristofferC
Copy link
Owner

What happens on e.g. WSL?

Base has some timing functionality to deal with slow paste on Windows now (JuliaLang/julia#39538). Perhaps we can do something similar to that.

@MarcMush
Copy link
Contributor Author

basically instant in WSL, even with OhMyREPL for 5k characters ! 🎉
(I updated #239 (comment))
I tested with 1.7.0-beta4 for both windows and wsl

@MarcMush
Copy link
Contributor Author

MarcMush commented Aug 31, 2021

...but only in Windows Terminal, in the crappy default terminal it takes about 4 seconds (for the test in #239)

src/repl.jl Outdated Show resolved Hide resolved
@KristofferC
Copy link
Owner

If possible, I think trying to do the same as the REPL itself does with the timing is preferable because that should work on the old windows terminal and it is also good to not let the implementation here drift too far away from the one in Julia itself.

Co-authored-by: Kristoffer Carlsson <kcarlsson89@gmail.com>
@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@933970c). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #240   +/-   ##
=========================================
  Coverage          ?   19.26%           
=========================================
  Files             ?       12           
  Lines             ?      867           
  Branches          ?        0           
=========================================
  Hits              ?      167           
  Misses            ?      700           
  Partials          ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 933970c...f39806f. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants