diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-02-02 11:26:50 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-02-02 11:26:50 -0500 |
commit | 4ff4d669ccb658b8b48785d37946378a5b29688c (patch) | |
tree | a32804722d6172a23504213b2e862e90b1fa636e /ted.c | |
parent | b712ad8c8c949f7b715c593531fdb5f0285014a9 (diff) |
big fix with buffer_pos_to_pixels
also started rust highlighting
Diffstat (limited to 'ted.c')
-rw-r--r-- | ted.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -168,7 +168,7 @@ static Status ted_open_buffer(Ted *ted, u16 *buffer_idx, u16 *tab) { // Returns true on success static bool ted_open_file(Ted *ted, char const *filename) { u16 buffer_idx, tab_idx; - if (buffer_is_untitled(ted->active_buffer) && buffer_empty(ted->active_buffer)) { + if (ted->active_buffer && buffer_is_untitled(ted->active_buffer) && buffer_empty(ted->active_buffer)) { // the active buffer is just an empty untitled buffer. open it here. return buffer_load_file(ted->active_buffer, filename); } else if (ted_open_buffer(ted, &buffer_idx, &tab_idx)) { |