From 6a0c2ef91cd4dd711a5ea12dc1582a3aa9178dc3 Mon Sep 17 00:00:00 2001 From: Cristian Ciocaltea Date: Wed, 9 Jan 2019 18:36:25 +0200 Subject: [PATCH] Fix stripping trailing spaces for custom file types using the DIFF lexer (#2041) --- src/editor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/editor.c b/src/editor.c index d95879a6a0..6c476ef243 100644 --- a/src/editor.c +++ b/src/editor.c @@ -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')))