From c2cdafdd5c92f8caa4701257ba91dd7915054fbe Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Wed, 23 Jul 2025 01:15:45 +0300 Subject: if EX falis because of a dirty buffer, the buffer's id is now included in the error message --- src/core-commands.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/core-commands.c') diff --git a/src/core-commands.c b/src/core-commands.c index a1d180c..04cdf94 100644 --- a/src/core-commands.c +++ b/src/core-commands.c @@ -2581,9 +2581,10 @@ teco_state_ecommand_exit(teco_machine_main_t *ctx, GError **error) teco_int_t v; if (!teco_expressions_pop_num_calc(&v, teco_num_sign, error)) return; - if (teco_is_failure(v) && teco_ring_is_any_dirty()) { - g_set_error_literal(error, TECO_ERROR, TECO_ERROR_FAILED, - "Modified buffers exist"); + guint id; + if (teco_is_failure(v) && (id = teco_ring_get_first_dirty())) { + g_set_error(error, TECO_ERROR, TECO_ERROR_FAILED, + "Buffer with id %u is dirty", id); return; } } -- cgit v1.2.3