Skip to content

Fix IDE quickhelp merging macro-annotated parameter names - #392

Open
fantaisie-software wants to merge 3 commits into
develfrom
fix/ide-quickhelp-macro-annotation-spacing
Open

fantaisie-software wants to merge 3 commits into
develfrom
fix/ide-quickhelp-macro-annotation-spacing

Conversation

@fantaisie-software

@fantaisie-software fantaisie-software commented Sep 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fixes https://www.purebasic.fr/english/viewtopic.php?t=88913: the IDE status bar quickhelp/tooltip for a procedure call merged a parameter's preceding annotation word (e.g. an empty macro like _IN/_OUT used purely for documentation) into the following parameter name/pointer, e.g. showing _INb / _OUT*c instead of _IN b / _OUT *c.
  • Root cause: Parser_Cleanup() in PureBasicIDE/SourceParser.pb only preserved the space following the special Array/List/Map keywords before stripping otherwise-insignificant whitespace from a procedure prototype. Any other word directly followed by another word had that separating space stripped, silently gluing the two together.
  • Fix: generalize the space-preservation so any word directly followed by another word or a pointer (*name) keeps its single separating space, not just the three hardcoded keywords.

Test plan

  • Built the IDE via make (cd PureBasicIDE && make), no errors/warnings.
  • Reproduced the reporter's exact repro in the freshly built IDE and confirmed the quickhelp now shows test(List a, _IN b, _OUT *c) with correct spacing instead of test(List a, _INb, _OUT*c).
Macro _IN
EndMacro

Macro _OUT
EndMacro

Procedure test(List a, _IN b, _OUT *c)
EndProcedure

test(

🤖 Generated with Claude Code

Fred Laboureur and others added 3 commits September 11, 2026 16:03
Parser_Cleanup() only preserved a space after the special Array/List/Map
keywords before stripping insignificant whitespace from a procedure's
prototype text, so any other word directly followed by another word (e.g.
an empty macro like _IN/_OUT used purely for parameter annotation) had its
separating space stripped too. This made the status bar quickhelp show
"_INb" / "_OUT*c" instead of "_IN b" / "_OUT *c" for code such as:

  Macro _IN
  EndMacro

  Procedure test(List a, _IN b, _OUT *c)
  EndProcedure

Generalize the space-preservation to any word directly followed by another
word or a pointer (*name), not just the three hardcoded keywords.

Also documents in AGENTS.md that `make` (not MakeWindows.cmd) is the
default Windows build, and that BuildEnv.cmd isn't needed on machines that
already have the PB_* build env vars set permanently.

Fixes https://www.purebasic.fr/english/viewtopic.php?t=88913

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Record the steps actually used to open PR #392: origin is the upstream
repo directly (direct push rights, no fork), branch from origin/devel,
keep unrelated dirty working-tree files out of the topic branch via a
pathspecd stash, and pass the PR body via --body-file rather than an
inline heredoc (nested backticks/parens in the description broke it).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
AGENTS.md/CLAUDE.md are machine-local working notes for AI coding
agents, not project sources - drop AGENTS.md from this PR (it does
not belong bundled with the quickhelp fix) and gitignore both files
so they stay untracked going forward.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant