Skip to content

vim #defines leak out to rest of app #225

@city41

Description

@city41

Is your feature request related something that is currently hard to do? Please describe.
vim contains very "generic" defines such as #define OK 1. When using vim as a library, these defines can leak out to the rest of the app and cause some grief.

Describe the solution you'd like
I am unsure of a truly good solution. But maybe libvim.h should not include vim.h, which pulls in all of vim, but rather pull in a more strategic set of files?

Another possible solution is to namespace these defines, like #define VIM_OK 1 but can certainly understand why changing vim's code is not so great.

And of course, another solution is just ignore this problem. I suppose it depends on how far libvim gets used. If it really only ever powers Oni, then this might not matter.

Describe alternatives you've considered
I have used #undef after #includeing libvim.h, which patches the problem. But since I don't know what defines vim has made, I am unsure when/if this will bite me again in the future.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions