Python: Print file:line when editing UI source

This commit is contained in:
Campbell Barton
2018-07-03 07:22:26 +02:00
parent 8c15d612a5
commit eb7286bfd2

View File

@@ -730,11 +730,14 @@ void UI_editsource_active_but_test(uiBut *but)
static int editsource_text_edit(
bContext *C, wmOperator *op,
char filepath[FILE_MAX], int line)
const char filepath[FILE_MAX], const int line)
{
struct Main *bmain = CTX_data_main(C);
Text *text;
/* Developers may wish to copy-paste to an external editor. */
printf("%s:%d\n", filepath, line);
for (text = bmain->text.first; text; text = text->id.next) {
if (text->name && BLI_path_cmp(text->name, filepath) == 0) {
break;