Skip to content

Commit

Permalink
Fix w command moving to next line when encountering underscore
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonk committed Sep 21, 2024
1 parent e3f8cb0 commit 89d1b97
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/view.v
Original file line number Diff line number Diff line change
Expand Up @@ -1987,6 +1987,11 @@ enum PositionWithinWord as u8 {
}

fn is_special(r rune) ?rune {
// We have to check for the underscore here because is_non_alpha includes
// underscores for large number digit separation!
if r == `_` {
return r
}
if !is_whitespace(r) && is_non_alpha(r) && !(r == `\n` || r == `\r`) {
return r
}
Expand Down

0 comments on commit 89d1b97

Please sign in to comment.