fixed dumb whitespace merge problem

master
Allen Webster 2016-09-24 17:26:37 -04:00
commit 7b66fad3b8
1 changed files with 4 additions and 6 deletions

View File

@ -86,18 +86,16 @@ read_line(Application_Links *app,
Partial_Cursor begin = {0}; Partial_Cursor begin = {0};
Partial_Cursor end = {0}; Partial_Cursor end = {0};
int32_t success = false; int32_t success = 0;
if (buffer_compute_cursor(app, buffer, if (buffer_compute_cursor(app, buffer, seek_line_char(line, 1), &begin)){
seek_line_char(line, 1), &begin)){ if (buffer_compute_cursor(app, buffer, seek_line_char(line, 65536), &end)){
if (buffer_compute_cursor(app, buffer,
seek_line_char(line, 65536), &end)){
if (begin.line == line){ if (begin.line == line){
if (0 <= begin.pos && begin.pos <= end.pos && end.pos <= buffer->size){ if (0 <= begin.pos && begin.pos <= end.pos && end.pos <= buffer->size){
int32_t size = (end.pos - begin.pos); int32_t size = (end.pos - begin.pos);
*str = make_string(push_array(part, char, size+1), size+1); *str = make_string(push_array(part, char, size+1), size+1);
if (str->str){ if (str->str){
success = true; success = 1;
buffer_read_range(app, buffer, begin.pos, end.pos, str->str); buffer_read_range(app, buffer, begin.pos, end.pos, str->str);
str->size = size; str->size = size;
terminate_with_null(str); terminate_with_null(str);