Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TornaxO7 committed Jan 26, 2025
1 parent 8301274 commit 4babe8c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3561,8 +3561,8 @@ fn open(cx: &mut Context, open: Open, comment_continuation: CommentContinuation)
let is_not_shebang = curr_line_num > 0
|| line
.as_str()
.map(|line| SHEBANG_REGEX.captures(line).is_some())
.unwrap_or(false);
.map(|line| SHEBANG_REGEX.captures(line).is_none())
.unwrap_or(true);

if is_not_shebang
&& comment_continuation == CommentContinuation::Enabled
Expand Down Expand Up @@ -4095,8 +4095,12 @@ pub mod insert {
let is_not_shebang = curr_line_num > 0
|| line
.as_str()
.map(|line| SHEBANG_REGEX.captures(line).is_some())
.unwrap_or(false);
.map(|line| {
let value = SHEBANG_REGEX.captures(line).is_none();
log::warn!("Check line: {} => {:?}", line, SHEBANG_REGEX.captures(line));
value
})
.unwrap_or(true);

if is_not_shebang && config.continue_comments {
doc.language_config()
Expand Down

0 comments on commit 4babe8c

Please sign in to comment.