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

Geany buffer strangeness: is the buffer shared between tabs? #3805

Closed
rubyFeedback opened this issue Mar 27, 2024 · 4 comments
Closed

Geany buffer strangeness: is the buffer shared between tabs? #3805

rubyFeedback opened this issue Mar 27, 2024 · 4 comments
Labels

Comments

@rubyFeedback
Copy link

rubyFeedback commented Mar 27, 2024

Right now I am writing on a non-programming .md file in geany.

Oddly enough when I type "intern", that substring, suddenly a
drop-down box pops out and wants to complete onto:

internal_hash[:use_this_build_directory] = nil

This is actually ruby code, which I use in another file that is
open right now, in another tab. (More specifically, the full line is:

@internal_hash[:use_this_build_directory] = nil

)

However had, the .md file I am using right now, is not related
to programming, so I am a bit confused as to why geany wants
to autocomplete. Perhaps one can make an argument that
in a larger project with many different files, this is ok-behaviour,
and I would not object to this e. g. from an IDE point of view - but
the .md file I am currently working on is not part of any project,
so popping up that information in this context is incorrect,
and I would prefer to not see it for that particular file.

So if one is to agree with that opinion, that this should not be
shown for e. g. a .md file, and unless this is a bug (which
should then be fixed) the question then is ... how to fine-tune
this behaviour, without disabling it completely?

The first solution I can think of would be to enable and
disable this on a toggle option. This won't fix the issue per
se, but it would allow one to disable it for some time, and
then re-enable. Not an elegant solution but it could work
for a temporary fix.

So let's now think of a more elegant solution. One I can
think of would be to be able to "group" files together into
some project, but to still be able to open new files into
geany that are not part of the project. Then, when we have this
enabled, we can say "ok, I want this pop-out box to show when
I work with files in the project as such, but not outside of the
project". This is also not super-elegant, but it would give us
a tiny bit more fine-tuned control.

There are probably more solutions to this, some even simpler.
One could also disable this for files such as .md or .txt files,
which is probably the better default, but one can say that some
of these .md files may be technical documents, so then the
pop-up box may make sense. Although I still think this is the less
common way most people use .md files, so I would still disable
it as the default.

For those confused what I mean, here is a partial screenshot -
remember that this is for the currently open buffer of the .md
file at hand. There is no code in that file, so showing up the
@internal_hash part is simply wrong for THAT particular file:

https://i.imgur.com/eacJRfj.png

@elextr
Copy link
Member

elextr commented Mar 28, 2024

On all new issues or discussions always put at least version of Geany and platform, but preferably the first few lines of Help->Debug Messages down to OS line if it exists else GTK line.

@elextr
Copy link
Member

elextr commented Mar 28, 2024

You might have the Preferences->Editor->Completions->Autocomplete all words option on. Note that the internal_hash you claim is code exists in the md file at line 34, no need for Ruby.

@elextr elextr added can't reproduce A developer couldn't reproduce the issue invalid and removed can't reproduce A developer couldn't reproduce the issue labels Mar 28, 2024
@elextr
Copy link
Member

elextr commented Mar 28, 2024

For some of the other project related functions you speculated about, try the various project plugins to see if one suits you (there are various ones and they remain plugins because there is no agreement on how it should function, so it can't be built-in ;-)

@eht16
Copy link
Member

eht16 commented Mar 28, 2024

@rubyFeedback please note that you can attach images also directly to the issue. This saves us from opening thrird party websites just to see a small image. Thank you.

I agree with @elextr, the described completion behavior is caused by the Preferences->Editor->Completions->Autocomplete all words option and because the completed text is also present in the very same document. This is how this feature is intended to work.

I will close the issue.

@eht16 eht16 closed this as completed Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants