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

invalid character index in bracketed paste #23797

Closed
KristofferC opened this issue Sep 20, 2017 · 1 comment
Closed

invalid character index in bracketed paste #23797

KristofferC opened this issue Sep 20, 2017 · 1 comment
Labels
REPL Julia's REPL (Read Eval Print Loop) strings "Strings!"

Comments

@KristofferC
Copy link
Sponsor Member

KristofferC commented Sep 20, 2017

Pasting in the REPL gives:

julia> ERROR (in the keymap): UnicodeError: invalid character index
Stacktrace:
 [1] getindex(::String, ::UnitRange{Int64}) at ./strings/string.jl:253
 [2] bracketed_paste(::Base.LineEdit.MIState) at ./repl/LineEdit.jl:1645
 [3] (::getfield(Base.REPL, Symbol("##32#42")))(::Base.LineEdit.MIState, ::Base.REPL.LineEditREPL, ::Vararg{Any,N} where N) at ./repl/REPL.jl:852
[...]

Relevant line is

input = readuntil(ps.terminal, "\e[201~")[1:(end-6)]

@bkamins Perhaps you can fix this one since you are the invalid string expert :)

@KristofferC KristofferC added REPL Julia's REPL (Read Eval Print Loop) strings "Strings!" labels Sep 20, 2017
bkamins added a commit to bkamins/julia that referenced this issue Sep 20, 2017
@KristofferC We will have to live with such hacks until JuliaLang#23765 is implemented.
bkamins added a commit to bkamins/julia that referenced this issue Sep 20, 2017
@KristofferC We will have to live with such hacks until JuliaLang#23765 is implemented.
@bkamins
Copy link
Member

bkamins commented Sep 20, 2017

Fixed in #23798.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
REPL Julia's REPL (Read Eval Print Loop) strings "Strings!"
Projects
None yet
Development

No branches or pull requests

3 participants