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

Wrong autocompletion if \begin{...} and \end{...} are in the same line #12

Closed
kubkon opened this issue Jul 2, 2015 · 2 comments
Closed

Comments

@kubkon
Copy link

kubkon commented Jul 2, 2015

The package does not seem to check if for a \begin{..} there is a matching \end{...} in the same line. Instead, it overeagerly inserts the matching \end{...} when a new line is inserted.

In order to replicate, consider an example:

\begin{equation}
  \begin{pmatrix} v1\\ v2 \end{pmatrix}
\end{equation}

If you then insert a new line after \end{pmatrix}, an additional \end{pmatrix} will be inserted below it:

\begin{equation}
  \begin{pmatrix} v1\\ v2 \end{pmatrix}
    % cursor moved to the new line
  \end{pmatrix} % <-- this statement was autocompleted
\end{equation}
@redw0lf
Copy link

redw0lf commented Jul 20, 2015

I hope I'm posting this in the correct issue.. At least it sounds like a similar problem to me:

The same/sth. similar occurs if you have more than one of the same environment (e.g. nested \begin{itemize} ... \end{itemize}) Somehow it autocompletes anywhere after the first item. If i click in the first \item row

to replicate

\begin{itemize}
    \item aaaaaa
    \item b
    \begin{itemize} % no autocompletion here
        \item abc
    \end{itemize} % this end is not autocompleted!!!
\end{itemize}

now if you click anywhere in the aaaaaa and type sth it will autocomplete the first \begin{itemize} and it's hard to fix and remove this autocompletion (because it keeps reapearing).

result after clicking in the aaaaaa and writing a b:

\begin{itemize}
    \item aaab
    \end{itemize}aaa
    \item b
    \begin{itemize} % no autocompletion here
        \item abc
    \end{itemize} % this end is not autocompleted!!!
\end{itemize}

@Focus
Copy link
Owner

Focus commented Jul 25, 2015

Thanks to both of you for the bug reports. I have fixed the bug of kubkon. The nesting bug that redw0lf reported is somewhat harder to fix. I have opened up a new bug report for this #15

@Focus Focus closed this as completed Jul 25, 2015
Focus pushed a commit that referenced this issue Feb 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants