While looking at some Geany code, I noticed that `DOC_VALID()` is used in some callbacks where it's supposed to check whether the document was closed in the meantime:
https://github.com/geany/geany/blob/11b4a00a3020b1c9ace3d3ae65aa5ec7d5ff84e…
Unless I'm missing something, I don't think it's correct - if the pointer to the `doc` was freed in the meantime, `DOC_VALID()` usage would lead to memory access over invalid pointer.
In the LSP plugin plugin I have to deal with a similar situation where I cannot be sure whether the document still exists when I receive a response from the LSP server as a callback. I use this function:
```C
gboolean lsp_utils_doc_is_valid(GeanyDocument *doc)
{
gint i;
foreach_document(i)
{
if (doc == documents[i])
return TRUE;
}
return FALSE;
}
```
Even this function isn't 100% correct - the original document could have been closed and a new document created at the same time and the new document's pointer could be identical to the closed document's pointer so `doc` would be valid but pointing to a different document. (I decided to accept this limitation as I think it's not so frequent.)
My question is, shouldn't we do something similar in Geany?
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/3872
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/issues/3872(a)github.com>
hi,
I wasn't sure if this is really happening or I just do something differently...
But it is...
**the problem:**
I have an open file in Geany...
and I have made some changes to it... but haven't saved it
typed "//1234" at line 6, for example...
If I open this file in another text editor... and type "//5678"... @ line 6 or anywhere...
and save it...
the reload dialog shows up...
**GOOD...**
BUT when I download files from the server with Filezilla... and overwrite it...
no dialog shows up at all...
whereas in other text editors, Kate, for example, it does: do you want to reload the file?
I'm already using KATE...
but I love Geany...
I just can't risk uploading an old version of a file overwriting work that has been done....
Peter
..................................................
system info:
https://termbin.com/5rti
- - - thank you for developing Geany!! - - -
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/3839
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/issues/3839(a)github.com>
I have been using geany with the vimode plugin. Just wanted to share a few places where I found bugs.
1. I am not able to enter normal mode whenever the number lock is on.
2. when I delete a line using the command `dd` the page shifts down till the point the cursor is at the top. Whereas it should have gone the line below and not shifted the page, And when I undo after deleting the line (I have seen this behavior in this particular case only) the cursor goes to the bottom of the document.
--
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-plugins/issues/1136
I turn on `vimode` in Geany, had it on before but have toggled it off/on, after upgrading to Ubuntu 22.04 and there is no Visual Mode anymore even though the cursor changes it still is in Insert Mode with no way to go to Visual Mode.
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/issues/1174
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany-plugins/issues/1174(a)github.com>
When session opening starts, this signal is emitted with parameter TRUE, when it stops, with FALSE.
This gives plugins information e.g. whether document opening happens as a result of user action or whether it's part of initial session opening.
For the LSP plugin this is used to detect the finally displayed document for which the server is started, otherwise if "document-open" is used, it would start servers for all open document filetypes immediately on Geany start which is unnecessary and could slow start time.
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/3707
-- Commit Summary --
* Add "session-opening" signal emitted when session opening starts/stops
-- File Changes --
M doc/pluginsignals.c (12)
M src/geanyobject.c (7)
M src/geanyobject.h (1)
M src/keyfile.c (4)
M src/libmain.c (16)
M src/main.h (2)
-- Patch Links --
https://github.com/geany/geany/pull/3707.patchhttps://github.com/geany/geany/pull/3707.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3707
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/pull/3707(a)github.com>
Hi! I've grown really attached to being able to set different colors for C++ comments (//) and document comments (///), and I'm looking to replicate that for python code (maybe ## or something). Glancing through LexPython, I don't see anything about document comments like I do in LexCPP. Is anyone aware of a way to achieve two different color of Python comments without modifying stock Geany? The best I have now is using triple-quoted blocks, but I find I don't use it because it's so many characters. Thanks!
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/discussions/3869
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/repo-discussions/3869(a)github.com>
Let's try to make cppcheck work again, and even report useful stuff.
During the journey it found a few actual issues, which is good. It also found some false-positives, which isn't so good.
We probably could reduce the false positives by not using `--library=gtk`, but that also would reduce the actual issues it can find.
There are a few issues that should be reported upstream, but it's harder than it looks… if I could only remember my password on their tracker :confused:
Anyway, what do you guys think? Is it good? Are there too many false-positives? Should the suppressions be moved back to `AM_CPPCHECKFLAG`s not to alter the code, although it makes it harder to maintain?
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany-plugins/pull/1346
-- Commit Summary --
* cppcheck: Enable parallelism to match Make call
* cppcheck: Properly define GETTEXT_PACKAGE globally
* cppcheck: Undefine GEANY_PRIVATE
* cppcheck: Use cppcheck's own gtk support
* cppcheck: Define the common plugin defines to their actual values
* ci: Enable exhaustive cppcheck checking
* cppcheck: Enable inline suppression hints
* addons: Fix memory leak detected by cppcheck
* geanyprj: Fix memory leak detected by cppcheck
* workbench: Fix memory leak detected by cppcheck
* geniuspaste: Fix memory leak detected by cppcheck
* markdown: Slightly rewrite two tests for cppcheck's sake
* cppcheck: Add inline suppressions for false-positives
* Remove obsolete cppcheck suppressions
* treebrowser: Move cppcheck suppressions inline
-- File Changes --
M .github/workflows/build.yml (2)
M addons/src/ao_tasks.c (11)
M build/cppcheck-geany-plugins.cfg (4)
M build/cppcheck.mk (6)
M geanyctags/src/geanyctags.c (2)
M geanygendoc/src/ggd-options.c (1)
M geanyprj/src/Makefile.am (3)
M geanyprj/src/utils.c (3)
M geniuspaste/src/geniuspaste.c (5)
M git-changebar/src/gcb-plugin.c (1)
M markdown/src/conf.c (4)
M scope/src/Makefile.am (2)
M scope/src/debug.c (4)
M treebrowser/src/Makefile.am (3)
M treebrowser/src/treebrowser.c (2)
M vimode/src/cmd-runner.c (2)
M workbench/src/sidebar.c (6)
M workbench/src/wb_project.c (4)
M workbench/src/workbench.c (4)
-- Patch Links --
https://github.com/geany/geany-plugins/pull/1346.patchhttps://github.com/geany/geany-plugins/pull/1346.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/pull/1346
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany-plugins/pull/1346(a)github.com>
Each object in the list is a file object, not a string:
`ctags_tests = files([...` hence the message:
"tests/meson.build:359: DEPRECATION: Project uses feature that was always broken, and is now deprecated since '1.3.0': str.format: Value other than strings, integers, bools, options, dictionaries and lists thereof..."
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/3759
-- Commit Summary --
* Fix deprecation warning about str.format() during meson setup
-- File Changes --
M tests/meson.build (2)
-- Patch Links --
https://github.com/geany/geany/pull/3759.patchhttps://github.com/geany/geany/pull/3759.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3759
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/pull/3759(a)github.com>
Anyone had a try to see how much work it would be to adjust geany to gtk4?
Or optionally have it?
--
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/2713
The location to place themes when Geany has been installed from flatpak is:
/var/lib/flatpak/app/org.geany.Geany/x86_64/stable/<stringofcharacters>/files/share/geany/colorschemes/
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-themes/issues/47
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany-themes/issues/47(a)github.com>