macvim-dev / macvim-dev/macvim

MacVim exports standard UTIs, and does it wrongly, messing up the system

Open
#916 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Vim Script
Stars
7.9k
Forks
691
PR merge metrics
No merged PRs in 30d

Description

Instructions: Replace the template text and remove irrelevant text (including this line)

Describe the bug
MacVim exports standard UTIs, such as com.adobe.postscript. This is wrong, they should be imported, as they are defined by the system. What is worse, the declaration is seriously wrong. It declares the UTI as conforming to to public.plain-text. THIS IS WRONG it should conform to public.data and public.composite-content. This messes up the system seriously. For instance, when an app checks a UTI, it should use conformsTo to do so, and this will match public-plain-text for postscript, breaking the (other!) app. So you are actually sabotaging other apops and the system.

To Reproduce
In an (other!) app, check an UTI (for instance when writing data from a document based cocoa app) against com.adobe.postscript or public.plain-text (if both are supported)

Expected behavior
This should always match com.adobe.postscript when the type is com.adobe.postscript, and should match public.plain-text for public.plain-text.

Actual Behavior
When comparing public.plain-text against com.adobe.postscript, it now matches (conforms to), even if it should not.

Screenshots
If applicable, copy/paste the text or add screenshots to help explain your problem.

Environment (please complete the following information):

  • Vim version [e.g. 8.1.1234] (Or paste the result of vim --version.)
  • OS: [e.g. Ubuntu 18.04, Windows 10 1809, macOS 10.14]
  • Terminal: [e.g. GNOME Terminal, mintty, iTerm2, tmux, GNU screen] (Use GUI if you use the GUI.)

Additional context
Don't ever sabotage the system.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not name a file or test. Start by locating MacVim's macOS UTI declarations and compare how standard UTIs such as com.adobe.postscript are exported or imported. Done means standard UTIs are not incorrectly declared as conforming to public.plain-text, and the reported conformance comparison no longer matches.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, vim
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.