Vim doesn't work in safe mode
|Reported by:||heto||Owned by:||axeld|
|Component:||Applications/Command Line Tools||Version:||R1/pre-alpha1|
|Has a Patch:||no||Platform:||All|
Having a working text editor in safe mode would be good if, for example, some config file change renders the system unbootable in normal mode. The change could be reverted then even if a full backup of the original config file is not available.
The current build of vim (in hrev25105) prints "DEBUG: Couldn't initialize global fonts!" on the screen and exits when run in safe mode, although it works correctly inside Terminal when booted to normal mode.
Possible resolutions that I can think of include:
- Make vim initialize the GUI only if called so that the GUI is used--i.e. as gvim or with -g. (Perhaps load libbe.so dynamically, if this is needed?)
- Build two different versions of vim: one that's intended for use in normal mode, graphically or in Terminal, and one (e.g. rescue-vi) that has no graphical support but can be run in safe mode.
- Make fake_app_server always return B_OK for font initialization. Will probably lead to having to fake some other stuff too, which may break some apps in unpredictable ways when run under safe mode, so looks like an ugly solution to me.