macvim-dev / macvim-dev/macvim
Extensions reappear when macvim writes to a file
Personne n'a encore pris cette issue.
- Langage dominant
- Vim Script
- Étoiles
- 7.9k
- Forks
- 691
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Describe the bug:
If you have a file for which extensions normally appear in Finder, if you have disabled the showing of the extension on that file, the extension will re-appear when vim writes the file. Reproduced with both gui and non-gui versions of latest release of macvim. This does not occur with /usr/bin/vim.
To reproduce:
Create a file with an extension that is visible on the desktop, eg, foo.wiki. Select the file in finder, and use %-i to show the file information. In the file information box, select 'Hide extension'. The extension will disappear from the desktop name for the file.
Use macvim to open the file. On the first write to the file, the extension '.wiki' will reappear.
If you examine the file in a terminal window with 'ls -l@ filename.extension', prior to the write it will have the extended data
com.apple.FinderInfo 32
After the write this setting no longer appears. Same behavior with both the gui and non-gui usage of macvim.
Do the same test using Apple default /usr/bin/vim rather than mvim, and the extension visibility does not change.
Expected behavior:
The status of Finder's display the extension should not change when macvim writes the file.
Screenshots: none
Environment:
VIM version: VIM - Vi IMproved 8.1 (2018 May 18, compiled Feb 18 2019 23:51:40)
OS: macOS Mojave version10.14.5, patched to current
Terminal: iTerm, OSX Terminal app
Additional context:
I checked the gitub sites for both stock vim and macvim. There seems to be no issues (open or closed) which seemed relevant. Given that Apple's version is 8.0 rather than 8.1, it is possible that the bug was introduced after the 8.0 patchlevel 1283 release or that Apple fixed the bug but did not publish the fix.
Given that stock Apple vim works correctly, I chose to report this as a bug rather than a feature request to preserve the macOS extended attribute keys. The latter is actually a broader issue than what I report here, but it seems to me that if a file has extended attributes or security settings, those ought to be preserved as well as the simple extension visibility attribute. Similarly, one could argue that extended security information and file attributes should be applied to the .swp file as well. If you like, I'd be happy to open a feature request on that topic as well.
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par reproduire l’écriture sur macOS avec MacVim et comparez-la à celle de /usr/bin/vim, en utilisant l’attribut étendu com.apple.FinderInfo signalé comme différence observable. Suivez le chemin d’écriture du fichier responsable de la perte de cet attribut ; le travail est terminé lorsque le réglage des extensions masquées du Finder reste inchangé après que MacVim a écrit le fichier.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- macos, vim
- Domaine
- desktop, operating-systems
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100