macvim-dev / macvim-dev/macvim
Applescript `document` method not recognized
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Vim Script
- Sterne
- 7.9k
- Forks
- 691
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Steps to reproduce
- 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
- Execute script with
osascript script_name. - 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(orgvim, 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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Keine Quelldatei oder kein Test ist angegeben. Beginne damit, den Fehler mit dem gezeigten AppleScript zu reproduzieren, und untersuche das AppleScript-Wörterbuch von MacVim und die Dokumentverarbeitung; als erledigt gilt, wenn get path of document 1 den Pfad des vordersten Dokuments ohne den Fehler wegen eines ungültigen Index zurückgibt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- vim
- Bereich
- desktop
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 35/100