Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status bar showing scope: unknown unexpectedly #1279

Closed
elextr opened this issue Oct 27, 2016 · 2 comments
Closed

Status bar showing scope: unknown unexpectedly #1279

elextr opened this issue Oct 27, 2016 · 2 comments
Assignees
Labels
bug confirmed A developer reproduced this issue, or it affetcs enough users
Milestone

Comments

@elextr
Copy link
Member

elextr commented Oct 27, 2016

As pointed out by @kugel- on IRC some functions show scope "unknown" when the cursor is inside them, but they would be expected to show the function name, eg document_open_file()

I found it seems to be if the function declaration is more than one line, the scope shows "unknown" when the cursor is in the function body, change the declaration to one line and the scope shows correctly.

@kugel-
Copy link
Member

kugel- commented Oct 27, 2016

it seems to be if the function declaration is more than one line

Apparently only if the function parameters are split. Other functions that have the return value on a separate line are fine.

@techee Any idea?

@b4n
Copy link
Member

b4n commented Oct 27, 2016

As mentioned on IRC, I guess it's because Scintilla now folds on (), which probably confuses the algorithm.

b4n added a commit to b4n/geany that referenced this issue Oct 27, 2016
Since the Scintilla C++ lexer started to fold on `()` [1], the code
looking up the current scope is confused whenever the function
signature spans multiple lines.  Fix this by resolving matching
parentheses on the candidate line before checking the fold level that
follows actually contains the current line.

Fixes geany#1279.

[1] https://sourceforge.net/p/scintilla/feature-requests/1138/
    imported in 24f9198
@b4n b4n added bug confirmed A developer reproduced this issue, or it affetcs enough users labels Oct 27, 2016
b4n added a commit to b4n/geany that referenced this issue Dec 22, 2016
Since the Scintilla C++ lexer started to fold on `()` [1], the code
looking up the current scope is confused whenever the function
signature spans multiple lines.  Fix this by skipping fold levels that
correspond to parentheses.

Fixes geany#1279.

[1] https://sourceforge.net/p/scintilla/feature-requests/1138/
    imported in 24f9198
@b4n b4n closed this as completed in #1280 Dec 22, 2016
@b4n b4n self-assigned this Dec 22, 2016
@b4n b4n added this to the 1.30 milestone Dec 22, 2016
kugel- pushed a commit to kugel-/geany that referenced this issue Jan 9, 2017
Since the Scintilla C++ lexer started to fold on `()` [1], the code
looking up the current scope is confused whenever the function
signature spans multiple lines.  Fix this by skipping fold levels that
correspond to parentheses.

Fixes geany#1279.

[1] https://sourceforge.net/p/scintilla/feature-requests/1138/
    imported in 24f9198
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug confirmed A developer reproduced this issue, or it affetcs enough users
Projects
None yet
Development

No branches or pull requests

3 participants