After some more thinking about it, we can fix #3454 very easily by ourselves by checking whether the tag originates from a source file with a known/common C/C++ extension - if not, always set "local" to FALSE.
The first patch adds `is_c_source` flag to TMSourceFile to indicate whether the file has one of the known C/C++ extensions, the second patch uses this flag and for C/C++ sources sets "local" to TRUE only when this flag is set (in addition to ctag's isFileScope flag).
@b4n Does this fix look OK to you?
Fixes #3454.
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/3490
-- Commit Summary --
* Add a flag to TMSourceFile indicating whether it's a C/C++ source file
* For C/C++ only mark tag as local if it originates from a source file
-- File Changes --
M src/tagmanager/tm_ctags.c (7)
M src/tagmanager/tm_source_file.c (18)
M src/tagmanager/tm_source_file.h (2)
-- Patch Links --
https://github.com/geany/geany/pull/3490.patchhttps://github.com/geany/geany/pull/3490.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3490
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/pull/3490(a)github.com>
Having 2 files, *xx.foo* and *something.c* open as C (assume the *.foo* was a header or something):
<details><summary><em>xx.foo</em></summary>
```c
int xx_foo(int n);
```
</details>
<details><summary><em>something.c</em></summary>
```c
int main(void)
{
xx_foo(); // (1)
}
```
</details>
At `(1)`, neither autocompletion nor "go to tag" works, but calltip does.
Quick code look suggests that the `TMTag->lang` probably is wrong (I guess using the ctags-detected language (none?) instead of the actual parer's language?).
Causes real issues with a codebase full of `.hdl`s loaded as C++ (which are auto-generated headers included in just as auto-generated `.hxx`es).
@techee if you have insight that'd be amazing, otherwise I'll try and look at this deeper when (read: if :grin:) I get time.
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/3454
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/issues/3454(a)github.com>
Depends on #2355 for docs.
* Add *Project patterns* to open dialog file filters
* Re-use "File patterns" string in Find in Files dialog vs "Files" for clarity
* Show ungrouped filetypes first in open dialog file filter (fixes #2296 - see [this comment in particular](https://github.com/geany/geany/issues/2296#issuecomment-5337963…)
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/2356
-- Commit Summary --
* Add *Project patterns* to open dialog file filters
* Show ungrouped filetypes first in open dialog file filter
* docs: Document Open dialog options
* Update filter docs
* Re-use "File patterns" string in Find in Files dialog vs "Files"
-- File Changes --
M data/geany.glade (2)
M doc/geany.txt (40)
M src/dialogs.c (29)
M src/search.c (2)
-- Patch Links --
https://github.com/geany/geany/pull/2356.patchhttps://github.com/geany/geany/pull/2356.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/2356
When using *Tools->Config Files* to open a user file that doesn't exist.
This fixes the first line of `geany.css` being wrongly uncommented (and the rest unchanged) due to toggle comment being used and CSS not having a line comment.
Split out from #3396 as it's independent of it.
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/3450
-- Commit Summary --
* Don't comment global content unless it is Conf
-- File Changes --
M src/ui_utils.c (3)
-- Patch Links --
https://github.com/geany/geany/pull/3450.patchhttps://github.com/geany/geany/pull/3450.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3450
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/pull/3450(a)github.com>
I tried removing files from /usr/share/geany/filedefs and editing filetype-extensions.conf but neither of those changes resulted in a shorter file pick list. I use less than 10 file types on a regular basis, but picking them out of that scrolling, out of window, file list is a pain. How do I shorten that list?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2296
After the update to Scintilla 5.1.5, I started getting memory corruption crashes when saving some files. (Sorry for not noticing this before, I thought the Scintilla update didn't contain any changes on the Geany side.) I may be wrong but I think the problem is in
https://github.com/geany/geany/pull/3046/commits/d7c985e47412f8a53c5a8202a0…
and misunderstanding if the following Scintilla API change
>When calling SCI_GETTEXT, SCI_GETSELTEXT, and SCI_GETCURLINE with a NULL buffer argument to discover the length that should be allocated, do not include the terminating NUL in the returned value. The value returned is 1 less than previous versions of Scintilla. Applications should allocate a buffer 1 more than this to accommodate the NUL. The wParam (length) argument to SCI_GETTEXT and SCI_GETCURLINE also omits the NUL. This is more consistent with other APIs.
This part
>When calling SCI_GETTEXT, SCI_GETSELTEXT, and SCI_GETCURLINE with a NULL buffer argument to discover the length that should be allocated, do not include the terminating NUL in the returned value...
> ...The wParam (length) argument to SCI_GETTEXT and SCI_GETCURLINE also omits the NUL.
says that that the returned __length__ doesn't include NUL, not that the returned string misses the NUL character. The rest of the change description says that we should allocate `+1` buffer to accommodate for that.
I believe we should revert the above patch and then go through all the uses of `SCI_GETTEXT`, `SCI_GETSELTEXT`, and `SCI_GETCURLINE` and corresponding `sci_` wrappers and update the code where needed (including plugins). I don't think it's a good idea to update the `sci_` wrappers alone to mirror previous behavior since the whole Scintilla API is part of Geany's API so this is a API change anyway and making `sci_` functions do something else than direct Scintilla calls is confusing.
Rant: I really don't understand why Neil made this change - even though it fixes some inconsistency in Scintilla API, this is a hard to spot backwards incompatible change and such things shouldn't be made in minor releases of a library.
@kugel- @eht16 @elextr What do you think?
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/3095
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/issues/3095(a)github.com>
Instead of requiring the user to specify a browser just try to
use the system default browser through gtk_show_uri_on_window().
This is done when tool_prefs.browser_cmd is empty which is
also the new default.
This aligns with windows where we do this already. Though we're
bypassing tool_prefs.browser_cmd there entirely, while on non-Windows
we still honor tool_prefs.browser_cmd when it's set.
This is primarily useful for flatpak support where we cannot just
execute arbitrary commands on the host (unless using flatpak-spawn).
Also, firefox is arguably a bad default these days, given the
declined marked share.
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/3178
-- Commit Summary --
* Use gtk_show_uri_on_window() in utils_open_browser() by default
-- File Changes --
M data/geany.glade (1)
M src/keyfile.c (4)
M src/utils.c (18)
-- Patch Links --
https://github.com/geany/geany/pull/3178.patchhttps://github.com/geany/geany/pull/3178.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3178
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/pull/3178(a)github.com>