From 5f2ba352d3a4c1d29a8a1586b943ff4d703c56b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20H=C3=B8egh?= Date: Tue, 25 Nov 2014 07:39:57 +0100 Subject: [PATCH] Fix error regarding unescape_string introduced by commit adca441118137f48bd751dfafdc94280b54b2ac6 and introduced some visual spaces. --- base/REPLCompletions.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/base/REPLCompletions.jl b/base/REPLCompletions.jl index 490bb41178adf2..113aae6721cb6b 100644 --- a/base/REPLCompletions.jl +++ b/base/REPLCompletions.jl @@ -187,13 +187,13 @@ function completions(string, pos) partial = string[1:pos] inc_tag = Base.incomplete_tag(parse(partial , raise=false)) if inc_tag in [:cmd, :string] - m = match(r"[\t\n\r\"'`@\$><=;|&\{]| (?!\\)",reverse(partial)) - startpos = length(partial)-(m == nothing ? 1 : m.offset) + 2 + m = match(r"[\t\n\r\"'`@\$><=;|&\{]| (?!\\)", reverse(partial)) + startpos = length(partial) - (m == nothing ? 1 : m.offset) + 2 r = startpos:pos - paths, r, success = complete_path(unescape_string(string[r]), pos) + paths, r, success = complete_path(replace(string[r], r"\\ ", " "), pos) if inc_tag == :string && length(paths) == 1 && # Only close if there's a single choice, - !isdir(unescape_string(string[startpos:start(r)-1] * paths[1])) && # except if it's a directory + !isdir(replace(string[startpos:start(r)-1] * paths[1], r"\\ ", " ")) && # except if it's a directory (length(string) <= pos || string[pos+1] != '"') # or there's already a " at the cursor. paths[1] *= "\"" end