diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-04-20 14:51:50 -0400 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-04-20 14:51:50 -0400 |
commit | a57a9682e74ff3609acb2ca6697fc6fa94c23fb6 (patch) | |
tree | bbe848dd7e5c7ae259fbcfdf3253240bc564c8d8 /buffer.c | |
parent | f90d98c3c451aa5be2979ff05863b5aa8bee9336 (diff) |
:set-language, various other little things
Diffstat (limited to 'buffer.c')
-rw-r--r-- | buffer.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -250,6 +250,8 @@ static inline Settings const *buffer_settings(TextBuffer *buffer) { // what programming language is this? Language buffer_language(TextBuffer *buffer) { + if (buffer->manual_language >= 1 && buffer->manual_language <= LANG_COUNT) + return (Language)(buffer->manual_language - 1); Settings const *settings = buffer_settings(buffer); char const *filename = buffer->filename; if (!filename) |