Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latex ac #1011

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 14 additions & 15 deletions ctags/parsers/latex.c
Expand Up @@ -36,13 +36,13 @@ typedef enum {
} TeXKind;

static kindOption TeXKinds[] = {
{ TRUE, 'f', "function", "command definitions" },
{ TRUE, 'c', "class", "environment definitions" },
{ TRUE, 'm', "member", "labels, sections and bibliography" },
{ TRUE, 'd', "macro", "subsections" },
{ TRUE, 'v', "variable", "subsubsections" },
{ TRUE, 'n', "namespace", "chapters"},
{ TRUE, 's', "struct", "labels and bibliography" }
{ true, 'f', "function", "command definitions" },
{ true, 'c', "class", "environment definitions" },
{ true, 'm', "member", "labels, sections and bibliography" },
{ true, 'd', "macro", "subsections" },
{ true, 'v', "variable", "subsubsections" },
{ true, 'n', "namespace", "chapters"},
{ true, 's', "struct", "labels and bibliography" }
};

#define TEX_BRACES (1<<0)
Expand All @@ -61,13 +61,15 @@ static int getWord(const char * ref, const char **ptr)
ref++, p++;

if (*ref)
return FALSE;
return false;


if (*p == '*') /* to allow something like \section*{foobar} */
p++;

*ptr = p;
return TRUE;

return true;
}

static void createTag(int flags, TeXKind kind, const char * l)
Expand Down Expand Up @@ -104,7 +106,6 @@ static void createTag(int flags, TeXKind kind, const char * l)
vStringPut(name, (int) *l);
++l;
} while ((*l != '\0') && (*l != '}'));
vStringTerminate(name);
if (name->buffer[0] != '}')
makeSimpleTag(name, TeXKinds, kind);
}
Expand All @@ -115,25 +116,23 @@ static void createTag(int flags, TeXKind kind, const char * l)
vStringPut (name, (int) *l);
++l;
} while (isalpha((int) *l) || *l == '@');
vStringTerminate(name);
makeSimpleTag(name, TeXKinds, kind);
}
else
{
vStringPut(name, (int) *l);
vStringTerminate(name);
makeSimpleTag(name, TeXKinds, kind);
}

no_tag:
no_tag:
vStringDelete(name);
}

static void findTeXTags(void)
{
const char *line;

while ((line = (const char*)fileReadLine()) != NULL)
while ((line = (const char*)readLineFromInputFile()) != NULL)
{
const char *cp = line;
/*int escaped = 0;*/
Expand Down Expand Up @@ -162,7 +161,7 @@ static void findTeXTags(void)
{
if (*cp == '*')
cp++;
createTag(TEX_BRACES, K_COMMAND, cp);
createTag(TEX_BRACES|TEX_BSLASH, K_COMMAND, cp);
continue;
}

Expand Down
3 changes: 3 additions & 0 deletions src/editor.c
Expand Up @@ -4939,6 +4939,9 @@ static ScintillaObject *create_new_sci(GeanyEditor *editor)
/* virtual space */
SSM(sci, SCI_SETVIRTUALSPACEOPTIONS, editor_prefs.show_virtual_space, 0);

/* input method editor's candidate window behaviour */
SSM(sci, SCI_SETIMEINTERACTION, editor_prefs.ime_interaction, 0);

#ifdef GDK_WINDOWING_QUARTZ
# if ! GTK_CHECK_VERSION(3,16,0)
/* "retina" (HiDPI) display support on OS X - requires disabling buffered draw
Expand Down
1 change: 0 additions & 1 deletion src/highlighting.c
Expand Up @@ -1617,7 +1617,6 @@ gboolean highlighting_is_string_style(gint lexer, gint style)

case SCLEX_BATCH:
case SCLEX_DIFF:
case SCLEX_LATEX:
case SCLEX_MAKEFILE:
case SCLEX_MARKDOWN:
case SCLEX_PROPERTIES:
Expand Down