Fix auto-indentation when the filetype is not set.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1516 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2007-05-08 17:45:54 +00:00
parent 954bb89060
commit 2e9935303c
2 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2007-05-08 Nick Treleaven <nick.treleaven@btinternet.com>
* src/sci_cb.c:
Fix auto-indentation when the filetype is not set.
2007-05-08 Enrico Tröger <enrico.troeger@uvena.de>
* src/sciwrappers.c, src/sciwrappers.h:

View File

@ -363,8 +363,6 @@ static void on_new_line_added(ScintillaObject *sci, gint idx)
{
gint pos = sci_get_current_position(sci);
if (doc_list[idx].file_type == NULL) return;
// simple indentation
if (doc_list[idx].use_auto_indention)
{
@ -374,7 +372,7 @@ static void on_new_line_added(ScintillaObject *sci, gint idx)
if (app->pref_editor_indention_mode == INDENT_ADVANCED)
{
// add extra indentation for Python after colon
if (doc_list[idx].file_type->id == GEANY_FILETYPES_PYTHON &&
if (FILETYPE_ID(doc_list[idx].file_type) == GEANY_FILETYPES_PYTHON &&
sci_get_char_at(sci, pos - 2) == ':' &&
sci_get_style_at(sci, pos - 2) == SCE_P_OPERATOR)
{