From 7a41176f7fca5f8a2f196f649f6cb5dc274dc2da Mon Sep 17 00:00:00 2001 From: Omar Khallaf Date: Sat, 10 Oct 2026 12:09:51 +0000 Subject: [PATCH] Add graph.cmt.col for aligned VV/agf comments Graph nodes forced asm.cmt.col=0 so comments rendered ragged. New graph.cmt.col (default 0, old behavior) drives the inner pD column, independent of pdf asm.cmt.col. e.g. e graph.cmt.col=30. Signed-off-by: Omar Mohamed --- libr/core/agraph.c | 2 +- libr/core/cconfig.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libr/core/agraph.c b/libr/core/agraph.c index 1044830193986..af1de295a554d 100644 --- a/libr/core/agraph.c +++ b/libr/core/agraph.c @@ -2165,7 +2165,7 @@ static char *get_body(RCore *core, ut64 addr, int size, int opts) { } r_config_set_b (core->config, "asm.lines.bb", false); r_config_set_b (core->config, "asm.lines", false); - r_config_set_i (core->config, "asm.cmt.col", 0); + r_config_set_i (core->config, "asm.cmt.col", r_config_get_i (core->config, "graph.cmt.col")); r_config_set_b (core->config, "asm.marks", false); r_config_set_b (core->config, "asm.cmt.right", (opts & BODY_SUMMARY) || o_cmtright); r_config_set_b (core->config, "asm.comments", (opts & BODY_SUMMARY) || o_comments); diff --git a/libr/core/cconfig.c b/libr/core/cconfig.c index 9ee0d9d77f7b5..74fffc987b9b8 100644 --- a/libr/core/cconfig.c +++ b/libr/core/cconfig.c @@ -4834,6 +4834,7 @@ R_API int r_core_config_init(RCore *core) { SETB ("graph.few", "false", "show few basic blocks in the graph"); SETB ("graph.comments", "true", "show disasm comments in graph"); SETB ("graph.cmtright", "false", "show comments at right"); + SETI ("graph.cmt.col", 0, "column to align graph node comments; 0=ragged as today"); SETCB ("graph.gv.format", "gif", &cb_graphformat, "graph image extension when using 'w' format (png, jpg, pdf, ps, svg, json)"); SETB ("graph.refs", "false", "hraph references in callgraphs (.agc*;aggi)"); SETB ("graph.json.usenames", "true", "use names instead of addresses in Global Call Graph (agCj)");