@b4n commented on this pull request.


> +
+               if (g_utf8_strchr(needles, -1, 'l') != NULL) {
+                       /* replace %l with the current 1-based line number */
+                       line_num = sci_get_current_line(doc->editor->sci) + 1;
+                       replacement = g_strdup_printf("%i", line_num);
+                       utils_string_replace_all(haystack, "%l", replacement);
+                       g_free(replacement);
+               }
+
+               /* if app->Project then                      */
+               /*   all %p placeholders are already removed */
+               /* else                                      */
+               /*   fall back to absolute path/name.ext     */
+               if (g_utf8_strchr(needles, -1, 'p') != NULL) {
+                       /* replace %p with the absolute path/filename 
(including extension) */
+                       utils_string_replace_all(haystack, "%p", 
doc->file_name);

This doesn't make any sense, and it used to be equivalent to `%d`, not `%d/%f`.
As is `%p` is entirely unreliable as it's impossible to know whether it's gonna 
be a path to a directory or a file. And it breaks use of `%p` in build commands.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/4250#pullrequestreview-2879840451
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/4250/review/[email protected]>

Reply via email to