[geany/geany] d32ae8: Apply filetype-specific indentation settings for newly opened files
Colomban Wendling
git-noreply at xxxxx
Mon Apr 14 00:46:11 UTC 2014
Branch: refs/heads/master
Author: Colomban Wendling <ban at herbesfolles.org>
Committer: Colomban Wendling <ban at herbesfolles.org>
Date: Mon, 14 Apr 2014 00:46:11 UTC
Commit: d32ae832022361bbe14cb133fe0fd104d83166a8
https://github.com/geany/geany/commit/d32ae832022361bbe14cb133fe0fd104d83166a8
Log Message:
-----------
Apply filetype-specific indentation settings for newly opened files
Fix the check enabling filetype-specific indentation settings to also
pass if the document has no filetype set yet, e.g. when opening it.
Modified Paths:
--------------
src/document.c
Modified: src/document.c
2 files changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -2445,7 +2445,7 @@ void document_set_filetype(GeanyDocument *doc, GeanyFiletype *type)
/* assume that if previous filetype was none and the settings are the default ones, this
* is the first time the filetype is carefully set, so we should apply indent settings */
- if (old_ft && old_ft->id == GEANY_FILETYPES_NONE &&
+ if ((! old_ft || old_ft->id == GEANY_FILETYPES_NONE) &&
doc->editor->indent_type == iprefs->type &&
doc->editor->indent_width == iprefs->width)
{
--------------
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