colonelpanic8 / multi-line

multi-line everything from function invocations and definitions to array and map literals in a wide variety of languages
57 stars 6 forks source link

The fourth call to `multi-line` doesn't seem to do anything #11

Open duianto opened 3 years ago

duianto commented 3 years ago

This package was just added as a transient state: SPC x n in Spacemacs. [editing] add binding for multi-line #14386

From some quick testing. Nothing seems to happen the fourth time multi-line is called.

The fifth time, it works the same as the second time, which starts the cycle over. but when it reaches a single line, then the next call to multi-line doesn't do anything again.

Expected

Calling multi-line should cycle to the next state with every call.

Observed

In a python file (.py). With the cursor inside the square brackets.

a = [1, 2, 3]

M-x multi-line results in:

a = [
    1, 2, 3,
]

M-x multi-line again, results in:

a = [
    1,
    2,
    3,
]

M-x multi-line a third time, returns it to a single line:

a = [1, 2, 3]

M-x multi-line a fourth time, doesn't change anything.

a = [1, 2, 3]

M-x multi-line a fifth time, starts the cycle again:

a = [
    1, 2, 3,
]
Windows 10, System Info (Click to expand)
#### System Info :computer:
- OS: windows-nt
- Emacs: 27.1
- Spacemacs: 0.300.0
- Spacemacs branch: develop (rev. e5620ddfb)
- Graphic display: t
- Distribution: spacemacs
- Editing style: vim
- Completion: helm
- Layers:
```elisp
(auto-completion autohotkey emacs-lisp git helm html markdown multiple-cursors
                 (org :variables org-agenda-files
                      '("c:/Users/username/org/"))
                 shell spell-checking syntax-checking treemacs version-control)
```
- System configuration features: XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY W32NOTIFY ACL GNUTLS LIBXML2 HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS MODULES THREADS JSON PDUMPER LCMS2 GMP