Skip to content

Commit

Permalink
Fix stripping trailing spaces for custom file types using the DIFF le…
Browse files Browse the repository at this point in the history
…xer (geany#2041)
  • Loading branch information
cristicc committed Jan 9, 2019
1 parent c113d47 commit 6a0c2ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/editor.c
Expand Up @@ -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')))
Expand Down

0 comments on commit 6a0c2ef

Please sign in to comment.