Movement with return ligature is misaligned
- Dominant language
- Emacs Lisp
- Stars
- 22.7k
- Forks
- 3.1k
- Avg merge
- 10h 46m
- Merged PRs (30d)
- 4
Description
### What did you expect to happen?
1-wide +extra ligatures allow movement to remain aligned, for example, if I am on a line that combines three characters into a 1-wide character (e.g. `int` → `ℤ`), even though I might be on logical column 9, moving down will keep me on visual column 7. I expect this to work for all ligatures, not just those with 1-wide characters.
### What actually happened?
This might be an upstream issue or an issue with the font that I am using (fira code) but when on a line with a 2-wide ligature from +extra like `return`, `yield`, `tuple`, etc., moving away from it will place you one visual character back, (if you are in front of the ligature—if you are behind it nothing special happens).
### Additional details
- [`.doom.d` in my dotfiles repo](https://github.com/MithicSpirit/dotfiles/tree/47821099f3ea42f2d485b5da98d51fbaf6e4b850/.doom.d)
- Screenshots
- Inital

- After pressing `k` to move up one character

- No relevant errors (just one thing from LSP)
### Steps to reproduce
1. Enable `:ui (ligatures +extra)`
2. Open a file in a language that has a statement which combines into a 2-wide ligature (e.g. python)
3. Type some code with at least two lines and a `return` statement or other 2-wide ligature. Example for python:
```py
def func():
a = 15
return a
"""
Looks like
ƒ func():
a = 15
⟼ a
"""
```
4. Move the cursor to the right of the 2-wide ligature (`⟼` for `return`)
5. Press `k` to move up one line. The cursor should be visually offset by 1 to the left
6. Pressing `j` to move down again will offset the cursor by 1 to the right
### System information
((system
(type . gnu/linux)
(config . "x86_64-pc-linux-gnu")
(shell . "/usr/bin/zsh")
(uname . "Linux 5.4.0-47-generic #51-Ubuntu SMP Fri Sep 4 19:50:52 UTC 2020 x86_64")
(path "~/.nvm/versions/node/v12.18.2/bin" "~/.local/bin" "~/bin" "/usr/local/bin" "~/.local/bin" "/usr/local/sbin" "/usr/local/bin" "/usr/sbin" "/usr/bin" "/sbin" "/bin" "/usr/games" "/usr/local/games" "/snap/bin" "/usr/lib/emacs/27.1/x86_64-linux-gnu"))
(emacs
(dir . "~/.emacs.d/")
(version . "27.1")
(build . "Sep 19, 2020")
(buildopts . "--build=x86_64-linux-gnu --prefix=/usr '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' --sysconfdir=/etc --localstatedir=/var --disable-silent-rules '--libdir=${prefix}/lib/x86_64-linux-gnu' '--libexecdir=${prefix}/lib/x86_64-linux-gnu' --disable-maintainer-mode --disable-dependency-tracking --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/27.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/27.1/site-lisp:/usr/share/emacs/site-lisp --program-suffix=27 --with-modules --with-file-notification=inotify --with-mailutils --with-harfbuzz --with-json --with-x=yes --with-x-toolkit=gtk3 --with-lcms2 --with-cairo --with-xpm=yes --with-gif=yes --with-gnutls=yes --with-jpeg=yes --with-png=yes --with-tiff=yes --with-xwidgets 'CFLAGS=-g -O2 -fdebug-prefix-map=/build/emacs27-bifpWT/emacs27-27.1~1.git86d8d76aa3=. -fstack-protector-strong -Wformat -Werror=format-security -no-pie' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -no-pie'")
(features . "XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS LIBSYSTEMD JSON PDUMPER LCMS2 GMP")
(traits batch server-running envvar-file))
(doom
(dir . "~/.doom.d/")
(version . "2.0.9")
(build . "HEAD -> develop c5605e9de 2020-10-07 21:51:10 -0400")
(elc-files . 184)
(modules :completion company (ivy +prescient +icons) :ui doom doom-dashboard doom-quit fill-column hl-todo indent-guides (ligatures +fira +extra) minimap modeline nav-flash ophints (popup +defaults) treemacs unicode vc-gutter vi-tilde-fringe workspaces zen :editor (evil +everywhere) file-templates fold (format +onsave) multiple-cursors snippets word-wrap :emacs (dired +icons) electric undo vc :term vterm :checkers syntax (spell +everywhere) grammar :tools debugger ein eval (lookup +dictionary +offline) lsp (magit +forge) pdf rgb :lang (cc +lsp) emacs-lisp (json +lsp) (javascript +lsp) (latex +latexmk +lsp +fold) (markdown +grip) (org +pretty) (python +lsp +poetry) (sh +lsp) (yaml +lsp) :email (mu4e +gmail) :app calendar irc :config (default +bindings +smartparens))
(packages "n/a")
(unpin "n/a")
(elpa "n/a")))
Contributor guide
Assessment
This issue has not been assessed yet.