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

Fixes backslash unicode autocompletion #2504

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update commands.rs
  • Loading branch information
VarLad authored May 19, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit a4201ea59b22413326d21a847b8dccfd9dcffafa
2 changes: 1 addition & 1 deletion helix-term/src/commands.rs
Original file line number Diff line number Diff line change
@@ -3587,7 +3587,7 @@ pub fn completion(cx: &mut Context) {
use helix_core::chars;
let mut iter = text.chars_at(cursor);
iter.reverse();
let offset = iter.take_while(|ch| chars::char_is_whitespace(*ch)).count();
let offset = iter.take_while(|ch| chars::char_is_word(*ch) || *ch == '\\').count();
let start_offset = cursor.saturating_sub(offset);
let prefix = text.slice(start_offset..cursor).to_string();