diff options
author | pommicket <pommicket@gmail.com> | 2023-03-23 13:22:16 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-03-23 13:22:16 -0400 |
commit | 63f54d13aa7233986f784ef857faef259a889ed6 (patch) | |
tree | 32e658f2de4505c90beda98091f53d212054cccc /buffer.c | |
parent | 000d571290008378ae64109f7dcb5947d452ef41 (diff) |
go-to-build-error now also detects rust ::: references
Diffstat (limited to 'buffer.c')
-rw-r--r-- | buffer.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -308,6 +308,9 @@ bool buffer_indent_with_spaces(TextBuffer *buffer) { } String32 buffer_get_line(TextBuffer *buffer, u32 line_number) { + if (line_number >= buffer->nlines) { + return str32(NULL, 0); + } Line *line = &buffer->lines[line_number]; return (String32) { .str = line->str, .len = line->len |