macvim-dev / macvim-dev/macvim

Applescript `document` method not recognized

Abierto
#1,266 7 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Feature Request System Integration
Lenguaje dominante
Vim Script
Estrellas
7.9k
Forks
691
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Steps to reproduce
  1. Create an Applescript that opens MacVim and calls document 1. Eg:
tell application MacVim
    activate
    set my_path to get path of document 1
end tell
  1. Execute script with osascript script_name.
  2. Find the error: Can’t get document 1. Invalid index. (-1719)

See more details here.

Expected behaviour

get path of document 1 should return the file path of the first document being currently displayed. I believe it's also called the 'front document'.

Version of Vim and architecture

9.0.65 (173)

Environment

Operating System: Bug Sur version 11.6.8 (20G730)
Terminal: Using MacVim GUI, not a terminal. It's version shows the Vim version 9.0.65 (173). It also says c2007 Bjorn Winckler.
Value of $TERM: xterm-256color

How MacVim was installed

brew install macvim

Logs and stack traces
Don't find any log or other error besides what's displayed.  Maybe I don't know how to turn on verbose logging?
Vim configuration where issue is reproducable

No response

Issue has been tested with given configuration
  • by running MacVim.app from GUI macOS interface
  • by running vim/gvim/etc installed by MacVim
  • by running other versions of vim (e.g. /usr/bin/vim)
Issue has been tested with no configuration
  • by running mvim --clean (or gvim, supplied by MacVim distribution)
  • by running vim --clean (in terminal, supplied by MacVim distribution)
  • by running vim --clean (in terminal, other suppliers, e.g. /usr/bin/vim)
Other conditions
  • The both Homebrew packages "vim" and "macvim" are installed

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

No se identifica ningún archivo fuente ni ninguna prueba. Empieza reproduciendo el fallo con el AppleScript mostrado e inspecciona el diccionario de AppleScript de MacVim y la gestión de documentos; se considera terminado cuando get path of document 1 devuelve la ruta del documento en primer plano sin el error de índice no válido.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
vim
Área
desktop
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.