Allow symbol auto completion in embedded JavaScript in HTML files (closes #1997409).

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2712 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2008-06-19 16:19:26 +00:00
parent 7fc218271a
commit b7802e2693
2 changed files with 6 additions and 3 deletions

View File

@ -14,6 +14,9 @@
* src/editor.c:
Improve scrolling on wrapped lines to avoid having search results on
wrapped lines but outside of visible lines.
* src/editor.c:
Allow symbol auto completion in embedded JavaScript in HTML files
(closes #1997409).
2008-06-18 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>

View File

@ -1231,9 +1231,9 @@ gboolean editor_start_auto_complete(GeanyDocument *doc, gint pos, gboolean force
root = linebuf + startword;
rootlen = current - startword;
/* entity autocompletion always in a HTML file, in a PHP file only
* when we are outside of <? ?> */
if (ft->id == GEANY_FILETYPES_HTML ||
/* entity autocompletion always in a HTML file except when inside embedded JavaScript,
* in a PHP file only when we are outside of <? ?> */
if ((ft->id == GEANY_FILETYPES_HTML && (style < SCE_HJ_START || style > SCE_HJ_REGEX)) ||
(ft->id == GEANY_FILETYPES_PHP && (style < SCE_HPHP_DEFAULT || style > SCE_HPHP_OPERATOR) &&
line != (sci_get_line_count(sci) - 1))) /* this check is a workaround for a Scintilla bug:
* the last line in a PHP gets wrong styling */