[geany/geany] 6a0c2e: Fix stripping trailing spaces for custom file types using the DIFF lexer (#2041)

Cristian Ciocaltea git-noreply at xxxxx
Wed Jan 9 16:39:54 UTC 2019


Branch:      refs/heads/master
Author:      Cristian Ciocaltea <cristian.ciocaltea at gmail.com>
Committer:   Cristian Ciocaltea <cristian.ciocaltea at gmail.com>
Date:        Wed, 09 Jan 2019 16:39:54 UTC
Commit:      6a0c2ef91cd4dd711a5ea12dc1582a3aa9178dc3
             https://github.com/geany/geany/commit/6a0c2ef91cd4dd711a5ea12dc1582a3aa9178dc3

Log Message:
-----------
Fix stripping trailing spaces for custom file types using the DIFF lexer (#2041)


Modified Paths:
--------------
    src/editor.c

Modified: src/editor.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -4522,7 +4522,7 @@ void editor_strip_line_trailing_spaces(GeanyEditor *editor, gint line)
 	gchar ch = sci_get_char_at(editor->sci, i);
 
 	/* Diff hunks should keep trailing spaces */
-	if (sci_get_lexer(editor->sci) == SCLEX_DIFF)
+	if (editor->document->file_type->id == GEANY_FILETYPES_DIFF)
 		return;
 
 	while ((i >= line_start) && ((ch == ' ') || (ch == '\t')))



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list