Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
@KristofferC We will have to live with such hacks until JuliaLang#23765 is implemented.
  • Loading branch information
bkamins authored Sep 20, 2017
1 parent 83a89a1 commit d22c9ce
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions base/repl/LineEdit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1572,7 +1572,8 @@ function setup_search_keymap(hp)
# Bracketed paste mode
"\e[200~" => (s,data,c)-> begin
ps = state(s, mode(s))
input = readuntil(ps.terminal, "\e[201~")[1:(end-6)]
str = readuntil(ps.terminal, "\e[201~")
input = str[1:prevind(str, end-5)]
edit_insert(data.query_buffer, input); update_display_buffer(s, data)
end,
"*" => (s,data,c)->(edit_insert(data.query_buffer, c); update_display_buffer(s, data))
Expand Down Expand Up @@ -1642,7 +1643,8 @@ global tabwidth = 8

function bracketed_paste(s)
ps = state(s, mode(s))
input = readuntil(ps.terminal, "\e[201~")[1:(end-6)]
str = readuntil(ps.terminal, "\e[201~")
input = str[1:prevind(str, end-5)]
input = replace(input, '\r', '\n')
if position(buffer(s)) == 0
indent = Base.indentation(input; tabwidth=tabwidth)[1]
Expand Down

0 comments on commit d22c9ce

Please sign in to comment.