Never post edit notes for messages buffer

This commit is contained in:
Allen Webster 2019-01-31 04:56:58 -08:00
parent 4867c26c43
commit 5d1a0a50e9
6 changed files with 15 additions and 14 deletions

View File

@ -754,7 +754,7 @@ OPEN_FILE_HOOK_SIG(default_file_edit){
Buffer_Summary buffer = get_buffer(app, buffer_id, AccessAll);
Assert(buffer.exists);
if (buffer.buffer_name_len > 0 && buffer.buffer_name[0] != '*'){
if (buffer.buffer_name[0] != '*'){
char space[256];
String str = make_fixed_width_string(space);
append(&str, "edit finished: ");

View File

@ -247,7 +247,7 @@ edit_single__inner(System_Functions *system, Models *models, Editing_File *file,
file_relex(system, models, file, start, end, shift_amount);
}
else{
file_mark_edit_finished(&models->working_set, file);
file_mark_edit_finished(models, file);
}
// NOTE(allen): meta data
@ -366,7 +366,7 @@ edit_batch(System_Functions *system, Models *models, Editing_File *file,
file_relex(system, models, file, first_edit->start, last_edit->end, shift_total);
}
else{
file_mark_edit_finished(&models->working_set, file);
file_mark_edit_finished(models, file);
}
}break;
@ -398,7 +398,7 @@ edit_batch(System_Functions *system, Models *models, Editing_File *file,
token->size += local_shift;
shift_amount += local_shift;
}
file_mark_edit_finished(&models->working_set, file);
file_mark_edit_finished(models, file);
}
}break;
}
@ -422,7 +422,7 @@ edit_batch(System_Functions *system, Models *models, Editing_File *file,
// NOTE(allen): cursor fixing
Cursor_Fix_Descriptor desc = {};
desc.is_batch = 1;
desc.is_batch = true;
desc.batch = batch;
desc.batch_size = batch_size;
edit_fix_markers(system, models, file, layout, desc);

View File

@ -46,7 +46,6 @@ struct Editing_File_Settings{
i32 wrap_indicator;
Parse_Context_ID parse_context_id;
b32 dos_write_mode;
b32 virtual_white;
Face_ID font_id;
b8 unwrapped_lines;
b8 tokens_exist;
@ -55,7 +54,7 @@ struct Editing_File_Settings{
b8 unimportant;
b8 read_only;
b8 never_kill;
u8 pad[1];
b8 virtual_white;
};
struct Editing_File_State{

View File

@ -135,7 +135,7 @@ job_full_lex(System_Functions *system, Thread_Context *thread, Thread_Memory *me
}
file->state.tokens_complete = true;
file->state.still_lexing = false;
file_mark_edit_finished(&models->working_set, file);
file_mark_edit_finished(models, file);
system->release_lock(FRAME_LOCK);
}
@ -277,7 +277,7 @@ file_first_lex_serial(System_Functions *system, Models *models, Editing_File *fi
end_temp_memory(temp);
file->state.tokens_complete = true;
file_mark_edit_finished(&models->working_set, file);
file_mark_edit_finished(models, file);
}
}
@ -368,7 +368,7 @@ file_relex_parallel(System_Functions *system, Models *models, Editing_File *file
}
cpp_relex_complete(&state, array, &relex_array);
file_mark_edit_finished(&models->working_set, file);
file_mark_edit_finished(models, file);
}
else{
cpp_relex_abort(&state, array);
@ -487,7 +487,7 @@ file_relex_serial(System_Functions *system, Models *models, Editing_File *file,
}
cpp_relex_complete(&state, array, &relex_array);
file_mark_edit_finished(&models->working_set, file);
file_mark_edit_finished(models, file);
end_temp_memory(temp);

View File

@ -620,8 +620,10 @@ file_touch(Working_Set *working_set, Editing_File *file){
}
internal void
file_mark_edit_finished(Working_Set *working_set, Editing_File *file){
if (file->edit_finished_mark_node.next == 0){
file_mark_edit_finished(Models *models, Editing_File *file){
Editing_File *message_buffer = models->message_buffer;
if (file != message_buffer && file->edit_finished_mark_node.next == 0){
Working_Set *working_set = &models->working_set;
zdll_push_back(working_set->edit_finished_list.next,
working_set->edit_finished_list.prev,
&file->edit_finished_mark_node);

View File

@ -54,7 +54,7 @@ struct File_Name_Entry{
};
internal void
file_mark_edit_finished(Working_Set *working_set, Editing_File *file);
file_mark_edit_finished(Models *models, Editing_File *file);
#endif