Skip to content

Commit

Permalink
Replace all remaining uses of error_msg_() and remove global errbuf
Browse files Browse the repository at this point in the history
This concludes the previous work done in commits:

* 2594dac
* 5727160
* 702f2fd
* 778f9cc
* fab91f1
* 7da81f2
* f1ff10b
  • Loading branch information
craigbarnes committed Jan 15, 2025
1 parent 2594dac commit b3502f8
Show file tree
Hide file tree
Showing 29 changed files with 254 additions and 261 deletions.
4 changes: 2 additions & 2 deletions src/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ void free_blocks(Buffer *buffer)
static void buffer_unlock_and_free(EditorState *e, Buffer *buffer)
{
if (buffer->locked) {
unlock_file(&e->locks_ctx, e->err, buffer->abs_filename);
unlock_file(&e->locks_ctx, &e->err, buffer->abs_filename);
}

free_changes(&buffer->change_head);
Expand Down Expand Up @@ -405,7 +405,7 @@ void buffer_setup(EditorState *e, Buffer *buffer)
if (buffer->options.detect_indent && filename) {
detect_indent(buffer);
}
sanity_check_local_options(e->err, &buffer->options);
sanity_check_local_options(&e->err, &buffer->options);
}

void buffer_count_blocks_and_bytes(const Buffer *buffer, uintmax_t counts[2])
Expand Down
4 changes: 2 additions & 2 deletions src/change.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ bool undo(View *view)
count++;
}
if (count > 1) {
ErrorBuffer *ebuf = view->window->editor->err;
ErrorBuffer *ebuf = &view->window->editor->err;
info_msg(ebuf, "Undid %lu changes", count);
}
} else {
Expand All @@ -247,7 +247,7 @@ bool undo(View *view)

bool redo(View *view, unsigned long change_id)
{
ErrorBuffer *ebuf = view->window->editor->err;
ErrorBuffer *ebuf = &view->window->editor->err;
Change *change = view->buffer->cur_change;
view_reset_preferred_x(view);
if (!change->prev) {
Expand Down
Loading

0 comments on commit b3502f8

Please sign in to comment.