Kaydet (Commit) 6a0c2ef9 authored tarafından Cristian Ciocaltea's avatar Cristian Ciocaltea

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

üst c113d47e
...@@ -4522,7 +4522,7 @@ void editor_strip_line_trailing_spaces(GeanyEditor *editor, gint line) ...@@ -4522,7 +4522,7 @@ void editor_strip_line_trailing_spaces(GeanyEditor *editor, gint line)
gchar ch = sci_get_char_at(editor->sci, i); gchar ch = sci_get_char_at(editor->sci, i);
/* Diff hunks should keep trailing spaces */ /* Diff hunks should keep trailing spaces */
if (sci_get_lexer(editor->sci) == SCLEX_DIFF) if (editor->document->file_type->id == GEANY_FILETYPES_DIFF)
return; return;
while ((i >= line_start) && ((ch == ' ') || (ch == '\t'))) while ((i >= line_start) && ((ch == ' ') || (ch == '\t')))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment