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

[config files] Don't comment global content unless it is Conf #3450

Closed
wants to merge 1 commit into from

Conversation

ntrel
Copy link
Member

@ntrel ntrel commented Apr 9, 2023

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.

This fixes the first line of geany.css being uncommented.
@ntrel ntrel added this to the 1.39/2.0 milestone Apr 9, 2023
@elextr
Copy link
Member

elextr commented Apr 10, 2023

There is something seriously broken with Tools->Config Files that needs to be fixed first, see #3451. If thats working this might not be needed.

@elextr
Copy link
Member

elextr commented Apr 10, 2023

Ok, #3451 solved, my bad.

So, if I run current Geany git the first line in geany.css is not uncommented.

This does not appear to be needed, maybe check your repo is up to date so #3413 and #3428 are included?

@techee
Copy link
Member

techee commented Apr 11, 2023

@ntrel As @elextr said, I think you are not using an up-to-date Geany, the code looks a bit different now. In #3413 I wasn't sure what to do with the non-conf files and left the old code here

geany/src/ui_utils.c

Lines 2166 to 2171 in 5298f51

else
{
sci_select_all(doc->editor->sci);
keybindings_send_command(GEANY_KEY_GROUP_FORMAT,
GEANY_KEYS_FORMAT_COMMENTLINETOGGLE);
}

but I agree with the idea of your patch and I think the whole else branch should be dropped.

@techee
Copy link
Member

techee commented Oct 5, 2023

I've just created #3576 which does the same thing as this patch, it's just done against the latest code in master where the affected code got modified.

@ntrel Does it look OK to you?

@techee
Copy link
Member

techee commented Oct 6, 2023

I've just merged #3576 so I'm closing this one.

@techee techee closed this Oct 6, 2023
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.

None yet

3 participants