diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2025-07-23 01:15:45 +0300 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2025-07-23 01:15:45 +0300 |
commit | c2cdafdd5c92f8caa4701257ba91dd7915054fbe (patch) | |
tree | b8e0d94a978583d92c85c6eb5083d088485e8698 /src/core-commands.c | |
parent | 63a314144a36691a57c2e82fe2f3da008c403aba (diff) | |
download | sciteco-c2cdafdd5c92f8caa4701257ba91dd7915054fbe.tar.gz |
if EX falis because of a dirty buffer, the buffer's id is now included in the error message
Diffstat (limited to 'src/core-commands.c')
-rw-r--r-- | src/core-commands.c | 7 |
1 files changed, 4 insertions, 3 deletions
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; } } |