geany-plugins
geany-plugins copied to clipboard
LaTeX plugin: Keyboard shurtcuts for itemize and enumerate generate wrong result
If a assign a keyboard shortcut for generatin an itemize or enumerate environment, the result is
\begin{itemize}
\it
\end{itemize}em
where the correct output should be
\begin{itemize}
\item
\end{itemize}
Steps to reproduce:
- Assign some keyboard shortcut for itemize (or enumerate).
- Press that combination of keys.
My version of Geany is 1.33 (the one shipped with recent Debian-ish distributions), the LaTeX plugin version is 0.7.
LaTeX v0.7, Geany 1.36 (Ubuntu)
- menu:
Preferences > Keybindings > LaTeX > Insert Itemize List => Ctrl+Alt+M
- menu:
File > New
- menu:
Document > Set Filetype > Markup Languages > LaTeX source file
- in the new document:
Ctrl+Alt+M
Result:
\begin{itemize}
\item
\end{itemize}
AFAICT nothing has changed in Latex plugin in that area since forever, looks like something in the OPs system, just in case ping @frlan
Sorry for the late reaction ;)
To be honest I have not even an idea what might cause that issue. This function is actually done by building up a string
if (type == GLATEX_ENVIRONMENT_TYPE_LIST)
{
g_string_append(tmpstring, "\t\\item ");
}
and than later
GeanyDocument *doc = NULL;
doc = document_get_current();
if (doc != NULL && string != NULL)
{
…
editor_insert_text_block(doc->editor, string, pos, len, 0, TRUE);
}
}