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

Cursor moves to awkward position after enable visual-line-navigation in orgmode #16637

Open
bebound opened this issue Nov 2, 2024 · 3 comments

Comments

@bebound
Copy link
Contributor

bebound commented Nov 2, 2024

Description :octocat:

After enable visual-line-navigation with SPC-t-L, the cursor can move to the right of ... (fold section), and press h can't move cursor now. It shows beginning of line.

Reproduction guide 🪲

  • Start Emacs
  • Enable visual line mode
  • Move cursor to the right of ... in other lines
    image
  • Use jk to move cursor to the ... line, then the cursor is at the right of ...
    image
  • I can't use h to move cursor to left. Instead, I have to use l to let it move to the 'real' end of line, then I'm able to use h to move cursor to left.
    image

Observed behaviour: 👀 💔
I can't use h to move cursor.

Expected behaviour: ❤️ 😄
I can use h to move the cursor left.

It's also okay to prevent moving right of ..., as the <Tab> key doesn't work in this awkward position.

System Info 💻

  • OS: darwin
  • Emacs: 29.1
  • Spacemacs: 0.999.0
  • Spacemacs branch: develop (rev. 13c8050)
  • Graphic display: t
  • Running in daemon: nil
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
((auto-completion :variables auto-completion-enable-snippets-in-popup nil auto-completion-enable-help-tooltip t auto-completion-enable-sort-by-usage t)
 better-defaults git treemacs
 (org :variables org-enable-hugo-support t org-startup-indented t org-enable-sticky-header t)
 osx multiple-cursors org
 (shell :variables shell-default-height 30 shell-default-position 'bottom)
 (spell-checking :variables spell-checking-enable-auto-dictionary t)
 treemacs)
  • System configuration features: ACL GNUTLS JSON LIBXML2 MODULES NOTIFY KQUEUE PDUMPER SQLITE3 THREADS TOOLKIT_SCROLL_BARS TREE_SITTER XWIDGETS ZLIB

Backtrace 🐾

<<BACKTRACE IF RELEVANT>>
@alexey0308
Copy link

Hi @bebound, in my case I can use "h" to move to the left, but I have to press it twice.

Have you tried to set inside the user-init block?

(setq evil-respect-visual-line-mode t)

The docs for this variable says that it defines "Whether movement commands respect ‘visual-line-mode’."

This does not feel like spacemacs bug though, probably you may refer to the evil-org-mode package and search for similar issues reported there with regard of visual-line mode behaviour or create a new one.

@bebound
Copy link
Contributor Author

bebound commented Nov 4, 2024

(setq evil-respect-visual-line-mode t) does not have any effect.

It's weird that you can move the cursor to left when it's at the right of .... h binds to evil-backward-char, and it shows beginning of line.
Screenshot 2024-11-04 at 12 00 46

After press l to move cursor to here, then I'm able to use double press h to move it to left.

Screenshot 2024-11-04 at 11 54 00

Sorry, I'm not familiar with emacs and don't know how to create an empty config to verify if this issue is related to Evil or Spacemacs.

@alexey0308
Copy link

alexey0308 commented Nov 4, 2024

ok, in another buffer I could reproduce what you observe. Previously I was not able to get the cursor at the very end of the line, but when it is there it is indeed stuck and I can not use "h".

I tried to switch to the emacs keybinding (C-z) and this problem does not exist there, only in evil-mode.

Upd.: in insert-mode I can move with arrows everywhere.

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

2 participants