Skip to content

Commit

Permalink
Fix PATH_REGEX for relative parent directories
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp-M committed Dec 8, 2022
1 parent d0042d6 commit 1d47478
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4155,7 +4155,7 @@ pub fn completion_path(cx: &mut Context) {
let line_until_cursor = text.slice(begin_line..cursor).to_string();
// TODO find a good regex for most use cases (especially Windows, which is not yet covered...)
// currently only one path match per line is possible in unix
static PATH_REGEX: Lazy<Regex> = Lazy::new(|| Regex::new(r"((?:/|\./).*)$").unwrap());
static PATH_REGEX: Lazy<Regex> = Lazy::new(|| Regex::new(r"((?:\.{0,2}/)+.*)$").unwrap());

// TODO: trigger_offset should be the cursor offset but we also need a starting offset from where we want to apply
// completion filtering. For example logger.te| should filter the initial suggestion list with "te".
Expand Down

0 comments on commit 1d47478

Please sign in to comment.