macvim-dev / macvim-dev/macvim

Applescript `document` method not recognized

Ouverte
#1,266 7 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Feature Request System Integration
Langage dominant
Vim Script
Étoiles
7.9k
Forks
691
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Aucun fichier source ni test n'est identifié. Commencez par reproduire l'échec avec l'AppleScript indiqué et examinez le dictionnaire AppleScript de MacVim ainsi que la gestion des documents ; c'est terminé lorsque get path of document 1 renvoie le chemin du document au premier plan sans l'erreur d'index non valide.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
vim
Domaine
desktop
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.