micro icon indicating copy to clipboard operation
micro copied to clipboard

.patch file highlighted as mail

Open 0x5c opened this issue 3 years ago • 0 comments

Description of the problem or steps to reproduce

A .patch file will be highlighted as mail if it starts with the patch magic line:

From {commit hash} Mon Sep 17 00:00:00 2001

(The date and time is exactly Mon Sep 17 00:00:00 2001 for all patches)

One would expect micro to first try highlighting that file with the patch filetype since it has the .patch extension. But micro instead highlights it as mail since it matches the header rule for mail.

Specifications

$ micro --version
Version: 2.0.11-dev.59
Commit hash: c57c5c04
Compiled on May 23, 2022

0x5c avatar May 23 '22 04:05 0x5c