https://bugs.kde.org/show_bug.cgi?id=177611

Michel Ludwig <michel.lud...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|                            |https://invent.kde.org/offi
                   |                            |ce/kile/-/commit/3e1c376618
                   |                            |55d4845ca0bd54a8e7cda0cd6dc
                   |                            |cad
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #12 from Michel Ludwig <michel.lud...@gmail.com> ---
Git commit 3e1c37661855d4845ca0bd54a8e7cda0cd6dccad by Michel Ludwig, on behalf
of Kishore Gopalakrishnan.
Committed on 22/10/2023 at 14:07.
Pushed by mludwig into branch 'master'.

Environment completion: only insert newline when necessary

This change makes a newline to be inserted after \end{env} only if there
was text to
the right of the cursor when the user pressed enter. It also makes sure
the newline respects the existing indentation.
The special case of `\[...\]` is also handled.

**Test cases:**

In each case below, the pipe character is meant to denote the position of the
cursor, not an actual character. Place the cursor as indicated (in insert mode)
and press the Enter key on the keyboard.

**1.**
Before pressing Enter:
```
\begin{equation}|
```
After pressing Enter:
```
\begin{equation}
        |
\end{equation}
```

**2.**
Before pressing Enter:
```
\begin{align}
        \begin{split}|
\end{align}
```
After pressing Enter:
```
\begin{align}
        \begin{split}
                |
        \end{split}
\end{align}
```

**3.**
Before pressing Enter:
```
\begin{equation}|abc123
```
After pressing Enter:
```
\begin{equation}
        |
\end{equation}
abc123
```

**4.**
Before pressing Enter:
```
\begin{align}
        \begin{split}|abc123
\end{align}
```
After pressing Enter:
```
\begin{align}
        \begin{split}
                |
        \end{split}
        abc123
\end{align}
```

**5.**
Before pressing Enter:
```
\[|abcasdf
```
After pressing Enter:
```
\[
        |
\]
abcasdf
```

M  +8    -2    src/editorextension.cpp

https://invent.kde.org/office/kile/-/commit/3e1c37661855d4845ca0bd54a8e7cda0cd6dccad

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to