SUMMARY Placeholder variables (like %B) are not replaced when the "Run command" is executed. STEPS TO REPRODUCE 1. Set Working Directory to %B 2. Set a run command relative to the project dir 3. Click the "Build and run target" button OBSERVED RESULT The terminal has the users home directory as the current directory EXPECTED RESULT The working directory should be the same as for the build command. The variables should be replaced in every code path that uses the working directory. ADDITIONAL INFORMATION KateBuildView::slotRunAfterBuild() takes the working directory as is, whereas KateBuildView::buildCurrentTarget() replaces the variables. KateBuildView::buildCurrentTarget() also does not replace the variables if the "Build command" is empty.
Thanks for the report! You seem to have looked at the code already. Do you want to scratch your itch and create a merge request? If not, I'll add it to my todo
I created a merge request: https://invent.kde.org/utilities/kate/-/merge_requests/1419
fixed with https://invent.kde.org/utilities/kate/-/merge_requests/1419