Skip to content

Commit

Permalink
Merge pull request #1066 from noughtmare/hideous-git-comment
Browse files Browse the repository at this point in the history
Don't uglify second line of git commit if it is a comment
  • Loading branch information
noughtmare authored Feb 28, 2018
2 parents bd91818 + e312108 commit 2fa57e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
-------------------------
* Make switching to a buffer by name more lenient
* Add line numbers mechanics to core (Note: line numbers are not yet implemented in emacs and pango)
* [yi-keymap-vim] add line numbers commands
* [yi-frontend-vty] show line numbers when appropriate
* [yi-keymap-vim] Add line numbers commands
* [yi-frontend-vty] Show line numbers when appropriate
* [git commit mode] Don't uglify second line when it is a comment

0.17.1 (2017-11-03)
-------------------
Expand Down
5 changes: 3 additions & 2 deletions yi-misc-modes/src/Yi/Lexer/GitCommit.x
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ $nl { m (const SecondLine) Style.defaultStyle }
}

-- There should never be anything on the second line of a git commit message
-- so it is styled in a deliberately hideous color scheme.
-- so it is styled in a deliberately hideous color scheme, unless it's a comment.
<secondLine> {
.+ { c (const $ Style.withFg Style.red `mappend` Style.withBg Style.brown) }
^\# { m (const $ LineComment) Style.commentStyle }
. { c (const $ Style.withFg Style.red `mappend` Style.withBg Style.brown) }
$nl { m (const MessageLine) Style.defaultStyle }
}

Expand Down

0 comments on commit 2fa57e3

Please sign in to comment.