-
-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The default filetype detection algorithm only checks the last lines of .txt files for "ft=help" before setting the filetype to "text". Since there was an empty line at the end, the help page was getting marked as having filetype text first, and then help, which meant both autocmds were triggered. This fixes that by removing the extraneous newline; note that there is still a newline at the end of file, as is customary, and this just removes the second, unnecessary newline. Furthermore, this simplifies the logic for "gen_help.lua" and increases its robustness by using the "io.lines" function rather than reading the entire file as a string and using regular expressions to split it into lines.
- Loading branch information
1 parent
d9f997d
commit 2a7b39f
Showing
2 changed files
with
4 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters