Branch: refs/heads/master
Author: Colomban Wendling <ban(a)herbesfolles.org>
Committer: Colomban Wendling <ban(a)herbesfolles.org>
Date: Wed, 15 Feb 2023 22:30:25 UTC
Commit: 1a9db47b71e8820a11f6b54fbc652ebfb5b5f917
https://github.com/geany/geany/commit/1a9db47b71e8820a11f6b54fbc652ebfb5b5f…
Log Message:
-----------
French translation update
Translate new strings and fix a few mnemonic clashes.
Modified Paths:
--------------
po/fr.po
Modified: po/fr.po
4054 lines changed, 2074 insertions(+), 1980 deletions(-)
===================================================================
No diff available, check online
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Nick Treleaven <ntrel002(a)gmail.com>
Committer: GitHub <noreply(a)github.com>
Date: Fri, 17 Feb 2023 20:46:49 UTC
Commit: 00aaf374cb706032293f2834566a8d6e99cbfca6
https://github.com/geany/geany/commit/00aaf374cb706032293f2834566a8d6e99cbf…
Log Message:
-----------
Only insert multi-line comment continuation if previous line has it (#3392)
Don't insert * after new line in multi-line comment if previous line doesn't start with *
Fixes #3386.
Modified Paths:
--------------
doc/geany.txt
src/editor.c
Modified: doc/geany.txt
3 lines changed, 2 insertions(+), 1 deletions(-)
===================================================================
@@ -2217,7 +2217,8 @@ Automatic continuation multi-line comments
*
on the next line with the correct indentation based on the previous line,
- as long as the multi-line is not closed by ``*/``.
+ as long as the multi-line is not closed by ``*/``. If the previous line
+ has no ``*`` prefix, no ``*`` will be added to the new line.
Autocomplete symbols
When you start to type a symbol name, look for the full string to
Modified: src/editor.c
15 lines changed, 9 insertions(+), 6 deletions(-)
===================================================================
@@ -3535,8 +3535,8 @@ static void auto_multiline(GeanyEditor *editor, gint cur_line)
if (sci_get_style_at(sci, indent_pos) == style || indent_pos >= sci_get_length(sci))
{
gchar *previous_line = sci_get_line(sci, cur_line - 1);
- /* the type of comment, '*' (C/C++/Java), '+' and the others (D) */
- const gchar *continuation = "*";
+ /* the type of comment, '*' (C/C++/Java), '+' D comment that nests */
+ const gchar *continuation = (style == SCE_D_COMMENTNESTED) ? "+" : "*";
const gchar *whitespace = ""; /* to hold whitespace if needed */
gchar *result;
gint len = strlen(previous_line);
@@ -3569,10 +3569,13 @@ static void auto_multiline(GeanyEditor *editor, gint cur_line)
{ /* we are on the second line of a multi line comment, so we have to insert white space */
whitespace = " ";
}
-
- if (style == SCE_D_COMMENTNESTED)
- continuation = "+"; /* for nested comments in D */
-
+ else if (!(g_str_has_prefix(previous_line + i, continuation) &&
+ (i + 1 == len || isspace(previous_line[i + 1]))))
+ {
+ // previous line isn't formatted so abort
+ g_free(previous_line);
+ return;
+ }
result = g_strconcat(whitespace, continuation, " ", NULL);
sci_add_text(sci, result);
g_free(result);
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Nick Treleaven <ntrel002(a)gmail.com>
Committer: Nick Treleaven <ntrel002(a)gmail.com>
Date: Thu, 16 Feb 2023 17:29:24 UTC
Commit: 54cc6add80c72739de299fd671e75d57b6b528eb
https://github.com/geany/geany/commit/54cc6add80c72739de299fd671e75d57b6b52…
Log Message:
-----------
Add recent filename on saving when real_path is not set
real_path is set for any documents on disk.
Don't add new document opened from CLI to recent files, because it
doesn't exist yet.
No need now to add recent file on Save As, because real_path is nulled
before calling document_save_file.
Modified Paths:
--------------
src/document.c
src/libmain.c
Modified: src/document.c
4 lines changed, 1 insertions(+), 3 deletions(-)
===================================================================
@@ -1860,9 +1860,6 @@ gboolean document_save_file_as(GeanyDocument *doc, const gchar *utf8_fname)
* to ignore any earlier events */
monitor_file_setup(doc);
doc->priv->file_disk_status = FILE_IGNORE;
-
- if (ret)
- ui_add_recent_document(doc);
return ret;
}
@@ -2038,6 +2035,7 @@ static gchar *save_doc(GeanyDocument *doc, const gchar *locale_filename,
doc->real_path = utils_get_real_path(locale_filename);
doc->priv->is_remote = utils_is_remote_path(locale_filename);
monitor_file_setup(doc);
+ ui_add_recent_document(doc);
}
return NULL;
}
Modified: src/libmain.c
2 lines changed, 0 insertions(+), 2 deletions(-)
===================================================================
@@ -852,8 +852,6 @@ gboolean main_handle_filename(const gchar *locale_filename)
document_show_tab(doc);
else
doc = document_new_file(utf8_filename, NULL, NULL);
- if (doc != NULL)
- ui_add_recent_document(doc);
g_free(utf8_filename);
g_free(filename);
return TRUE;
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).