Skip to content

Relations in command cause get(vimtex#cmd#get_current(), 'name') return 0 #2446

@pilgrimlyieu

Description

@pilgrimlyieu

Description

Example code

$$
\ce{a > b}
$$

Steps to reproduce

$$
\ce{<cursor>a</cursor> > b}
$$

Put the cursor on a and execute this command :echo get(vimtex#cmd#get_current(), 'name'), The result is \ce.

$$
\ce{a > <cursor>b</cursor>}
$$

Then put the cursor on b and do that again. The result is 0 now.

Expected behavior

Both result is \ce.

Actual behavior

The result before relations is \ce, after is 0.

Do you use a latexmkrc file?

No

VimtexInfo

System info:
  OS: DESKTOP-U7CVG0I (Microsoft Windows 10 Æóҵ°æ)
  Vim version: VIM 9.0 (1-96)
  Has clientserver: true
  Servername: GVIM

VimTeX project: a
  base: a.tex
  root: C:\Users\Administrator\vimfiles\pythonx\mdtex
  tex: C:\Users\Administrator\vimfiles\pythonx\mdtex\a.tex
  main parser: current file
  document class: 
  compiler: latexmk
    engine: -pdf
    options:
      -verbose
      -file-line-error
      -shell-escape
      -synctex=1
      -interaction=nonstopmode
    build_dir: out
    callback: 1
    continuous: 1
    executable: latexmk
  viewer: General
  qf method: LaTeX logfile

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions