diff options
| author | Michael Mogenson <michael.mogenson@gmail.com> | 2019-07-09 11:06:32 -0400 |
|---|---|---|
| committer | Michael Mogenson <michael.mogenson@gmail.com> | 2019-08-20 14:55:17 -0400 |
| commit | 37ded5e400aac6e4cbe6ebcdc12795dd842d081a (patch) | |
| tree | e91a472d0992687e4b4f7ca2dd7b1c92e58244a6 /src/input_handler.cc | |
| parent | 09c514901d84fa9f9be6fa61af183c606e3a5926 (diff) | |
Check if buffile is path before loading editorconfig settings
Check if buffile is a full path by checking for the beginning
'/' character in editorconfig-load command. This avoids a parsing
error from feeding a *scratch*/*debug*/*grep*/etc. buffer name to the
editorcofig command. Don't clear editorconfig hooks until after checking
for a valid bufffile path. This way, opening the *debug* buffer will
not clear the hooks from a previously parsed .editorconfig file. If
trim_trailing_whitespace is true, print the hook directly from awk. This
removes the need to save a editorcofig_trim_trailing_whitespace option.
Note: Setting the max_line_length requires a window to be created.
Therefore, a global hook to load .editorconfig settings should be:
hook global WinCreate .* %{editorconfig-load}
Diffstat (limited to 'src/input_handler.cc')
0 files changed, 0 insertions, 0 deletions
