Only add to MRU in GUI mode and limit number of files added to the maximum that Cocoa will display.
Only files opened from the command line is added to the MRU (Most Recently Used files). Files opened from inside Vim (using :e, etc.) are not added to the MRU.
The tracking rect code had to be pulled to get tool tips to work. This has at least one negative drawback (the mouse cursor does not change back to an arrow when moved outside the window) and there may be more. Changes to 'bdlay' are only detected after disabling and re-enabling 'beval'.
Note that window coordinates are specified in a coordinate system where X points to the right and Y points upwards.
The only place 'long' was used was in scrollbar identifiers. These are now "truncated" to fit inside 32 bit (when compiling for 64 bit).
This both cleans up the code as well as improve support for binding to more key combinations. The Cocoa key bindings system is effectively disabled; a custom key binding dictionary is set up in KeyBinding.plist (so that keyboard navigation works in dialogs).
- dialog support not implemented yet - live resizing not supported
If the draw queue fills up with lots (i.e. twice the number of max rows) of insert/delete line commands we can remove draw commands from the beginning of the draw queue. This reduces the possibility of the draw queue overflowing.
Loading and unloading a font can take a substantial amount of time so this cuts down on the startup time.
It is no longer necessary to exit and re-enter fullscreen to see changes to the "background" setting in 'fopt'.
Don't flush on gui_mch_flush(); instead only flush when forced (happens e.g. if Vim is about to take a nap) or just before waiting for new input. This reduces screen flicker dramatically in certain cases.
The backend keeps at most one copy of each message on the input queue. This makes MacVim feel a lot more responsive e.g. when scrolling the screen. It used to be that holding down 'j' to scroll and then releasing 'j' would cause the screen to keep scrolling for a while even after the release.
This hopefully fixes the bug where a preloaded window sometimes failed to ever show up but MacVim would still think that it was showing.
The preferences panel allow for more ways to open files from other applications. This is controlled by three user preferences: - MMOpenInCurrentWindow - MMOpenLayout - MMVerticalSplit These options are also respected when dropping files on a window. The quickstart feature is currently disabled by default and can be enabled by setting the user default MMPreloadCacheSize to a positive integer. With it enabled, new windows open more or less instantaneously.
The new command allows better control over menus with ability to specify key equivalent, action, and wheter menu item is an alternate. These are specified as "key=value" pairs to allow future expansion. The help files have also been rewritten to reflect this change.
This enables the user to cycle through all actions by typing ":maca <Tab>" and then repeatedly hitting <Tab>. The help on :maca was also updated. (Initial patch by Nico Weber with some changes by Bjorn Winckler.)
When entering full-screen the 'fuoptions' option is used to determine whether the vim view should maximize in the vertical and/or horizontal directions. The previous rows/columns are restored upon returning to windowed mode. The help docs for 'fullscreen' have been updated and docs for 'fuoptions' have been added.
This commit adds support for the 'antialias' option with the ATSUI renderer (the NSTextView renderer still uses System Preferences). The docs on 'antialias' have been updated. Some changes to the code used by Carbon Vim is affected by this commit. A feature flag FEAT_ANTIALIAS was added to support easy disabling of 'antialias' support. (Patch by Jjgod Jiang with some modifications by Bjorn Winckler.)
Before terminating gracefully, send a TerminateNowMsgID to every Vim process so that they can determine whether MacVim quit or crashed. If MacVim quits, call getout() to exit Vim (this removes swap files), otherwise call getout_preserve_modified() (this preserves swap files).
When the default system keyboard script is non-roman the input manager is automatically switched to a roman keyboard script when going to normal mode. See 'imd', 'imc', 'imi' for some relevant options. MacVim uses an over-the-spot style of IM support.
Characters and columns are no longer assumed to be in one-to-one correspondence. Thus when modifying the text storage a (row,column) pair must be searched for. This is managed using [NSString rangeOfComposedCharacterSequenceAtIndex:] and by marking wide characters with an attribute (called "MMWideChar"). We also provide an optimized code path for when characters and columns are in one-to-one correspondence (no wide chars, only chars that can be represented by one utf16 character). A new typesetter is also used. Instead of overriding layoutGlyphsInLayoutManager:::: we override willSetLineFragmentRect::::. This typesetter can handle composing characters, whereas the old typesetter couldn't (it can still be used by setting the user default "MMTypesetter" to "MMTypesetter2".) Note that text rendering still has flaws, the Cocoa Text System and Vim has different opinions on how much space certain characters take up and this results in display bugs. (E.g. nonspacing marks such as U+064C are problematic.) Also, sometimes the layout manager hides glyphs but Vim assumes that each character is displayed (resulting in yet more display bugs). Added support for 'guifontwide'. This can be set to anything (different font size); it is quite possible to set it so that the display becomes completely messed up.
Mouse and keyboard input is handled immediately, all other input is put on a queue which is processed whenever gui_mch_update() is called. This avoids DO calls to be sent from the backend during processing of another DO call. (See comments in MMBackend processInput:data: and processInputQueue.) One problem this caused was that connectionDidDie notification was not received when processInput:data: got called recursively (and thus processes could "leak"). Also did some code cleanup to MMBackend.
Bug: With 'go+=c' Vim could enter a key wait loop while processInput==TRUE which caused all keyboard input to be dropped. Fix: Don't drop keyboard input when processInput==TRUE Bug: With 'go+c' Vim disabled all menu items before quitting which caused autoenabling not to work so the "New Window" was sometimes grey when no windows were open. Fix: Enable all menu items in recurseSetAutoenablesItems.