Compare commits

...

16 Commits

Author SHA1 Message Date
Bjorn Winckler ebfad47ec6 Snapshot 27
The 'make-snapshot.sh' script has been updated to run on Leopard with
Perl support (TCL support is disabled for now).
2008-05-11 17:54:22 +02:00
Bjorn Winckler 48e6f325d6 Update credits 2008-05-11 16:22:01 +02:00
Bjorn Winckler 1bc466c774 Move "Recent Files" menu 2008-05-10 16:11:43 +02:00
Bjorn Winckler f08c899208 Add files opened/saved from :browse to "Recent Files" menu 2008-05-10 16:07:58 +02:00
Bjorn Winckler 31bd050607 Avoid "dropping DO message ..." warning when quitting
The warning was a result of sending a DO message from Vim and then
immediately exiting the process.  It is avoided by not sending any DO
messages while Vim is exiting.
2008-05-10 15:25:44 +02:00
Bjorn Winckler 2e6fb2ea53 Enable macvim color scheme to work with other Vim ports 2008-05-09 21:58:19 +02:00
Nico Weber 862da53932 Add "Recent Files" menu
The recent files menu will only remember files opened from Finder and
not files opened from within Vim (via :e etc.).  Recent files will also
be added to the "Recent Items" menu under the Apple menu.

(Patch by Nico Weber with some modifications by Bjorn Winckler.)
2008-05-09 21:41:39 +02:00
Bjorn Winckler 15763286bd Window no longer moves down on zoom 2008-05-09 15:05:31 +02:00
Bjorn Winckler fed823a238 Modifying 'antialias' in .[g]vimrc now works 2008-05-09 13:36:15 +02:00
Bjorn Winckler 5d5176aabf Cmd-w shows confirmation dialog when buffer modified 2008-05-09 13:27:03 +02:00
Enno Lübbers 19468d3117 Add background color option to 'fuopt' 2008-05-08 12:31:28 +02:00
Bjorn Winckler 0402b6b5c4 Merge upstream 2008-05-07 21:47:00 +02:00
vimboss b6932fb3ae updated for version 7.1-297 2008-05-07 19:46:51 +00:00
vimboss 22695b7f3b updated for version 7.1-296 2008-05-07 17:09:24 +00:00
vimboss bc8b62f3d9 updated for version 7.1-295 2008-05-07 15:40:33 +00:00
vimboss bd542602dd updated for version 7.1-294 2008-05-07 11:10:28 +00:00
38 changed files with 604 additions and 91 deletions
+12 -4
View File
@@ -1,7 +1,7 @@
" MacVim colorscheme
"
" Maintainer: Bjorn Winckler <bjorn.winckler@gmail.com>
" Last Change: 2007 Nov 17
" Last Change: 2008 May 9
"
" This is the default MacVim color scheme. It supports both light and dark
" backgrounds (see :h 'background').
@@ -50,7 +50,11 @@ hi TabLineFill gui=reverse
hi TabLineSel gui=bold
hi Title gui=bold guifg=DeepSkyBlue3
hi VertSplit gui=NONE guifg=DarkSlateGray guibg=Gray90
hi Visual guibg=MacSelectedTextBackgroundColor
if has("gui_macvim")
hi Visual guibg=MacSelectedTextBackgroundColor
else
hi Visual guibg=#72F7FF
endif
hi WarningMsg guifg=Firebrick2
" Syntax items (`:he group-name` -- more groups are available, these are just
@@ -101,7 +105,11 @@ else
hi DiffText gui=NONE guibg=Gold
hi LineNr guifg=#888888 guibg=#E6E6E6
hi MatchParen guifg=White guibg=MediumPurple1
hi Normal gui=NONE guifg=MacTextColor guibg=MacTextBackgroundColor
if has("gui_macvim")
hi Normal gui=NONE guifg=MacTextColor guibg=MacTextBackgroundColor
else
hi Normal gui=NONE guifg=Black guibg=White
endif
hi Search guibg=CadetBlue1 guifg=NONE
hi Statement gui=bold guifg=Maroon guibg=NONE
hi Todo gui=NONE guifg=DarkGreen guibg=PaleGreen1
@@ -115,7 +123,7 @@ endif
" Change the selection color on focus change (but only if the "macvim"
" colorscheme is active).
"
if !exists("s:augroups_defined")
if has("gui_macvim") && !exists("s:augroups_defined")
au FocusLost * if exists("colors_name") && colors_name == "macvim" | hi Visual guibg=MacSecondarySelectedControlColor | endif
au FocusGained * if exists("colors_name") && colors_name == "macvim" | hi Visual guibg=MacSelectedTextBackgroundColor | endif
+20 -3
View File
@@ -3057,8 +3057,8 @@ A jump table for the options with a short description can be found at |Q_op|.
(e.g. toolbar, title bar). The tab bar and scroll bars remain visible.
Updates to the window position are ignored in fullscreen mode.
See 'fuoptions' for how Vim resizes when entering and leaving
fullscreen mode.
See 'fuoptions' for how Vim resizes and colors the background when
entering and leaving fullscreen mode.
XXX: Add fuenter/fuleave autocommands? You might want to display
a NERDTree or a Tlist only in fullscreen for example. Then again, this
@@ -3073,7 +3073,8 @@ A jump table for the options with a short description can be found at |Q_op|.
{only in MacVim GUI}
In fullscreen mode, most of the screen is black, only a part of the
screen is covered by the actual Vim control. The control is centered.
This option controls the size of the Vim control.
This option controls the size of the Vim control as well as the color
of the unused screen area.
value effect ~
maxvert When entering fullscreen, 'lines' is set to the maximum number
of lines fitting on the screen in fullscreen mode. When
@@ -3085,12 +3086,28 @@ A jump table for the options with a short description can be found at |Q_op|.
leaving fullscreen, if 'columns' is still equal to the maximized
number of columns, it is restored to the value it had before
entering fullscreen.
background:color
When entering fullscreen, 'color' defines the color of the part
of the screen that is not occupied by the Vim control. If
'color' is an 8-digit hexadecimal number preceded by '#',
it is interpreted as an explicit color value '#aarrggbb', with
one byte each for the alpha, red, green, and blue values.
Otherwise, 'color' is interpreted as a highlight group name,
and the fullscreen background is filled with that highlight
group's background color, as defined by the current color
scheme.
Examples:
Don't change size of Vim when entering fullscreen: >
:set fuoptions=
< Maximize Vim when entering fullscreen: >
:set fuoptions=maxvert,maxhorz
< Maximize Vim only vertically when entering fullscreen, and color the
background dark blue: >
:set fuoptions=maxvert,background:#FF003042
< Don't change the size of Vim when entering fullscreen, and color the
background like the current text background: >
:set fuoptions=background:Normal
<
XXX: what if the font size is changed? you probably never want to
restore the old 'lines' or 'columns' in that case.
+4 -1
View File
@@ -3,7 +3,7 @@
vimtutor \- the Vim tutor
.SH SYNOPSIS
.br
.B vimtutor [language]
.B vimtutor [-g] [language]
.SH DESCRIPTION
.B Vimtutor
starts the
@@ -18,6 +18,9 @@ is useful for people that want to learn their first
.B Vim
commands.
.PP
The optional argument -g starts vimtutor with gvim rather than vim, if the
GUI version of vim is available, or falls back to Vim if gvim is not found.
.PP
The optional [language] argument is the two-letter name of a language, like
"it" or "es".
If the [language] argument is missing, the language of the current locale will
+4
View File
@@ -6,6 +6,8 @@
<string></string>
<key>arrangeInFront:</key>
<string></string>
<key>clearRecentDocuments:</key>
<string></string>
<key>fileOpen:</key>
<string></string>
<key>findNext:</key>
@@ -38,6 +40,8 @@
<string></string>
<key>performZoom:</key>
<string></string>
<key>recentFilesDummy:</key>
<string></string>
<key>selectNextWindow:</key>
<string></string>
<key>selectPreviousWindow:</key>
+12 -12
View File
@@ -1,33 +1,33 @@
{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf440
{\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;\f2\fswiss\fcharset77 Helvetica-Oblique;
}
{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf270
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\vieww9000\viewh8400\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural
\f0\b\fs24 \cf0 VIM - Vi IMproved
\f1\b0 \
\b0 \
\f2\i Bram Moolenaar et al.
\f1\i0 \
\i Bram Moolenaar et al.
\i0 \
\
\f0\b MacVim GUI\
\b MacVim GUI\
\f2\i\b0 Bj\'9arn Winckler\
\i\b0 Bj\'f6rn Winckler\
\f1\i0 \
\i0 \
with the help of:\
\f2\i Nico Weber\
\i Nico Weber\
George Harker\
Jjgod Jiang\
Tim Allen\
Chris Willmore\
Ben Schmidt\
Scott Renfro\
Enno L\'fcbbers\
\f1\i0 \
\i0 \
...and many others who have helped by reporting bugs etc.\
\
\
@@ -37,7 +37,7 @@ Toolbar icons from {\field{\*\fldinst{HYPERLINK "http://svn.gnome.org/viewvc/gno
\
Vim icons made by {\field{\*\fldinst{HYPERLINK "http://www.cs.princeton.edu/~mtwebb/vim_icon/vim_icons.html"}}{\fldrslt Matthew Webb}}.\
\
The default font in MacVim, DejaVu Sans Mono, is based on the Bitstream Vera\'aa and Arev fonts. Bitstream Vera\'aa is \'a9 2003 by Bitstream, Inc. Arev is \'a9 2006 by Tavmjong Bah. The DejaVu changes to these fonts are in the public domain.\
The default font in MacVim, DejaVu Sans Mono, is based on the Bitstream Vera\'99 and Arev fonts. Bitstream Vera\'99 is \'a9 2003 by Bitstream, Inc. Arev is \'a9 2006 by Tavmjong Bah. The DejaVu changes to these fonts are in the public domain.\
\
Thanks to Andy Matuschak for {\field{\*\fldinst{HYPERLINK "http://sparkle.andymatuschak.org/"}}{\fldrslt Sparkle}}.\
\
+1 -1
View File
@@ -545,7 +545,7 @@
<key>CFBundleSignature</key>
<string>VIMM</string>
<key>CFBundleVersion</key>
<string>26</string>
<string>27</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
+2
View File
@@ -20,6 +20,8 @@
NSString *openSelectionString;
ATSFontContainerRef fontContainerRef;
NSMutableDictionary *pidArguments;
NSMenuItem *recentFilesMenuItem;
}
- (void)removeVimController:(id)controller;
+39 -3
View File
@@ -171,20 +171,45 @@ static int executeInLoginShell(NSString *path, NSArray *args);
[pidArguments release]; pidArguments = nil;
[vimControllers release]; vimControllers = nil;
[openSelectionString release]; openSelectionString = nil;
[recentFilesMenuItem release]; recentFilesMenuItem = nil;
[super dealloc];
}
#if MM_HANDLE_XCODE_MOD_EVENT
- (void)applicationWillFinishLaunching:(NSNotification *)notification
{
// Create the "Open Recent" menu. See
// http://lapcatsoftware.com/blog/2007/07/10/working-without-a-nib-part-5-open-recent-menu/
// and http://www.cocoabuilder.com/archive/message/cocoa/2007/8/15/187793
// for more information.
//
// The menu needs to be created and be added to a toplevel menu in
// applicationWillFinishLaunching at the latest, otherwise it doesn't work.
recentFilesMenuItem = [[NSMenuItem alloc] initWithTitle:@"Open Recent"
action:nil keyEquivalent:@""];
NSMenu *recentFilesMenu = [[NSMenu alloc] initWithTitle:@"Open Recent"];
[recentFilesMenu performSelector:@selector(_setMenuName:)
withObject:@"NSRecentDocumentsMenu"];
[recentFilesMenu addItemWithTitle:@"Clear Menu"
action:@selector(clearRecentDocuments:)
keyEquivalent:@""];
[recentFilesMenuItem setSubmenu:recentFilesMenu];
[recentFilesMenu release]; // the menu is retained by recentFilesMenuItem
[recentFilesMenuItem setTag:-1]; // must not be 0
[[[[NSApp mainMenu] itemWithTitle:@"File"] submenu] addItem:recentFilesMenuItem];
#if MM_HANDLE_XCODE_MOD_EVENT
[[NSAppleEventManager sharedAppleEventManager]
setEventHandler:self
andSelector:@selector(handleXcodeModEvent:replyEvent:)
forEventClass:'KAHL'
andEventID:'MOD '];
}
#endif
}
- (void)applicationDidFinishLaunching:(NSNotification *)notification
{
@@ -261,6 +286,16 @@ static int executeInLoginShell(NSString *path, NSArray *args);
[arguments setObject:filenames forKey:@"filenames"];
[arguments setObject:[NSNumber numberWithBool:YES] forKey:@"openFiles"];
// Add file names to "Recent Files" menu.
int i, count = [filenames count];
for (i = 0; i < count; ++i) {
// Don't add files that are being edited remotely (using ODB).
if ([arguments objectForKey:@"remoteID"]) continue;
[[NSDocumentController sharedDocumentController]
noteNewRecentFilePath:[filenames objectAtIndex:i]];
}
if ((openInTabs && (vc = [self topmostVimController]))
|| (vc = [self findUntitledWindow])) {
// Open files in an already open window.
@@ -599,7 +634,8 @@ static int executeInLoginShell(NSString *path, NSArray *args);
setProtocolForProxy:@protocol(MMBackendProtocol)];
vc = [[[MMVimController alloc]
initWithBackend:backend pid:pid] autorelease];
initWithBackend:backend pid:pid recentFiles:recentFilesMenuItem]
autorelease];
if (![vimControllers count]) {
// The first window autosaves its position. (The autosaving
+1 -1
View File
@@ -114,7 +114,7 @@
- (int)lookupColorWithKey:(NSString *)key;
- (BOOL)hasSpecialKeyWithValue:(NSString *)value;
- (void)enterFullscreen:(int)fuoptions;
- (void)enterFullscreen:(int)fuoptions background:(int)bg;
- (void)leaveFullscreen;
- (void)setAntialias:(BOOL)antialias;
+8 -5
View File
@@ -439,9 +439,10 @@ static NSString *MMSymlinkWarningString =
// NOTE! This method gets called a lot; if we were to flush every time it
// got called MacVim would feel unresponsive. So there is a time out which
// ensures that the queue isn't flushed too often.
if (!force && lastFlushDate && -[lastFlushDate timeIntervalSinceNow]
< MMFlushTimeoutInterval
&& [drawData length] < MMFlushQueueLenHint)
if (exiting ||
(!force && lastFlushDate &&
-[lastFlushDate timeIntervalSinceNow] < MMFlushTimeoutInterval &&
[drawData length] < MMFlushQueueLenHint))
return;
if ([drawData length] > 0) {
@@ -1065,10 +1066,12 @@ static NSString *MMSymlinkWarningString =
return NO;
}
- (void)enterFullscreen:(int)fuoptions
- (void)enterFullscreen:(int)fuoptions background:(int)bg
{
NSMutableData *data = [NSMutableData data];
[data appendBytes:&fuoptions length:sizeof(int)];
bg = MM_COLOR(bg);
[data appendBytes:&bg length:sizeof(int)];
[self queueMessage:EnterFullscreenMsgID data:data];
}
@@ -1675,7 +1678,7 @@ static NSString *MMSymlinkWarningString =
add_to_input_buf((char_u*)"\x1c\xe", 2);
if (0 == cmdwin_type) {
// Command-line window was not open, so :q
add_to_input_buf((char_u*)":q\n", 3);
add_to_input_buf((char_u*)":conf q\n", 8);
}
}
} else {
+2 -1
View File
@@ -30,7 +30,8 @@
int startFuFlags;
}
- (MMFullscreenWindow *)initWithWindow:(NSWindow *)t view:(MMVimView *)v;
- (MMFullscreenWindow *)initWithWindow:(NSWindow *)t view:(MMVimView *)v
backgroundColor:(NSColor *)back;
- (void)enterFullscreen:(int)fuoptions;
- (void)leaveFullscreen;
+6 -4
View File
@@ -32,8 +32,9 @@
#import <Carbon/Carbon.h>
// These have to be the same as in option.h
#define FUOPT_MAXVERT 0x001
#define FUOPT_MAXHORZ 0x002
#define FUOPT_MAXVERT 0x001
#define FUOPT_MAXHORZ 0x002
#define FUOPT_BGCOLOR_HLGROUP 0x004
static int numFullscreenWindows = 0;
@@ -46,7 +47,8 @@ static int numFullscreenWindows = 0;
@implementation MMFullscreenWindow
- (MMFullscreenWindow *)initWithWindow:(NSWindow *)t view:(MMVimView *)v
- (MMFullscreenWindow *)initWithWindow:(NSWindow *)t view:(MMVimView *)v
backgroundColor:(NSColor *)back
{
NSScreen* screen = [t screen];
@@ -73,7 +75,7 @@ static int numFullscreenWindows = 0;
[self setHasShadow:NO];
[self setShowsResizeIndicator:NO];
[self setBackgroundColor:[NSColor blackColor]];
[self setBackgroundColor:back];
[self setReleasedWhenClosed:NO];
return self;
+4 -1
View File
@@ -40,9 +40,12 @@
NSData *resendData;
#endif
NSMenu *lastMenuSearched;
NSMenuItem *recentFilesMenuItem;
NSMenuItem *recentFilesDummy;
}
- (id)initWithBackend:(id)backend pid:(int)processIdentifier;
- (id)initWithBackend:(id)backend pid:(int)processIdentifier
recentFiles:(NSMenuItem*)menu;
- (id)backendProxy;
- (int)pid;
- (void)setServerName:(NSString *)name;
+59 -14
View File
@@ -81,6 +81,7 @@ static NSTimeInterval MMResendInterval = 0.5;
#if MM_RESEND_LAST_FAILURE
- (void)resendTimerFired:(NSTimer *)timer;
#endif
- (void)replaceMenuItem:(NSMenuItem*)old with:(NSMenuItem*)new;
@end
@@ -89,8 +90,12 @@ static NSTimeInterval MMResendInterval = 0.5;
@implementation MMVimController
- (id)initWithBackend:(id)backend pid:(int)processIdentifier
recentFiles:(NSMenuItem*)menu;
{
if ((self = [super init])) {
recentFilesMenuItem = [menu retain];
windowController =
[[MMWindowController alloc] initWithVimController:self];
backendProxy = [backend retain];
@@ -135,6 +140,9 @@ static NSTimeInterval MMResendInterval = 0.5;
[mainMenuItems release]; mainMenuItems = nil;
[windowController release]; windowController = nil;
[recentFilesMenuItem release]; recentFilesMenuItem = nil;
[recentFilesDummy release]; recentFilesDummy = nil;
[super dealloc];
}
@@ -574,6 +582,14 @@ static NSTimeInterval MMResendInterval = 0.5;
[NSApp setWindowsMenu:windowMenu];
}
// Replace real Recent Files menu in the old menu with the dummy, then
// remove dummy from new menu and put Recent Files menu there
NSMenuItem *oldItem = (NSMenuItem*)[recentFilesMenuItem representedObject];
if (oldItem)
[self replaceMenuItem:recentFilesMenuItem with:oldItem];
[recentFilesMenuItem setRepresentedObject:recentFilesDummy];
[self replaceMenuItem:recentFilesDummy with:recentFilesMenuItem];
shouldUpdateMainMenu = NO;
}
@@ -878,8 +894,12 @@ static NSTimeInterval MMResendInterval = 0.5;
[self setServerName:name];
[name release];
} else if (EnterFullscreenMsgID == msgid) {
int fuoptions = *(int*)[data bytes];
[windowController enterFullscreen:fuoptions];
const void *bytes = [data bytes];
int fuoptions = *((int*)bytes); bytes += sizeof(int);
int bg = *((int*)bytes);
NSColor *back = [NSColor colorWithArgbInt:bg];
[windowController enterFullscreen:fuoptions backgroundColor:back];
} else if (LeaveFullscreenMsgID == msgid) {
[windowController leaveFullscreen];
} else if (BuffersNotModifiedMsgID == msgid) {
@@ -902,9 +922,15 @@ static NSTimeInterval MMResendInterval = 0.5;
- (void)savePanelDidEnd:(NSSavePanel *)panel code:(int)code
context:(void *)context
{
NSString *string = (code == NSOKButton) ? [panel filename] : nil;
NSString *path = (code == NSOKButton) ? [panel filename] : nil;
@try {
[backendProxy setDialogReturn:string];
[backendProxy setDialogReturn:path];
// Add file to the "Recent Files" menu (this ensures that files that
// are opened/saved from a :browse command are added to this menu).
if (path)
[[NSDocumentController sharedDocumentController]
noteNewRecentFilePath:path];
}
@catch (NSException *e) {
NSLog(@"Exception caught in %s %@", _cmd, e);
@@ -1069,17 +1095,28 @@ static NSTimeInterval MMResendInterval = 0.5;
} else {
item = [[[NSMenuItem alloc] init] autorelease];
[item setTitle:title];
// TODO: Check that 'action' is a valid action (nothing will happen
// if it isn't, but it would be nice with a warning).
if (action) [item setAction:NSSelectorFromString(action)];
else [item setAction:@selector(vimMenuItemAction:)];
if (tip) [item setToolTip:tip];
if (key != 0) {
NSString *keyString =
[NSString stringWithFormat:@"%C", key];
[item setKeyEquivalent:keyString];
[item setKeyEquivalentModifierMask:mask];
if ([action isEqualToString:@"recentFilesDummy:"]) {
// Remove the recent files menu item from its current menu
// and put it in the current file menu. See -[MMAppController
// applicationWillFinishLaunching for more information.
//[[recentFilesMenuItem menu] removeItem:recentFilesMenuItem];
//item = recentFilesMenuItem;
recentFilesDummy = [item retain];
} else {
// TODO: Check that 'action' is a valid action (nothing will
// happen if it isn't, but it would be nice with a warning).
if (action) [item setAction:NSSelectorFromString(action)];
else [item setAction:@selector(vimMenuItemAction:)];
if (tip) [item setToolTip:tip];
if (key != 0) {
NSString *keyString =
[NSString stringWithFormat:@"%C", key];
[item setKeyEquivalent:keyString];
[item setKeyEquivalentModifierMask:mask];
}
}
}
@@ -1216,6 +1253,14 @@ static NSTimeInterval MMResendInterval = 0.5;
}
#endif
- (void)replaceMenuItem:(NSMenuItem*)old with:(NSMenuItem*)new
{
NSMenu *menu = [old menu];
int index = [menu indexOfItem:old];
[menu removeItemAtIndex:index];
[menu insertItem:new atIndex:index];
}
@end // MMVimController (Private)
+1 -1
View File
@@ -59,7 +59,7 @@
- (void)liveResizeWillStart;
- (void)liveResizeDidEnd;
- (void)enterFullscreen:(int)fuoptions;
- (void)enterFullscreen:(int)fuoptions backgroundColor:(NSColor *)back;
- (void)leaveFullscreen;
- (void)setBuffersModified:(BOOL)mod;
+17 -7
View File
@@ -546,12 +546,12 @@
}
}
- (void)enterFullscreen:(int)fuoptions
- (void)enterFullscreen:(int)fuoptions backgroundColor:(NSColor *)back
{
if (fullscreenEnabled) return;
fullscreenWindow = [[MMFullscreenWindow alloc]
initWithWindow:decoratedWindow view:vimView];
initWithWindow:decoratedWindow view:vimView backgroundColor:back];
[fullscreenWindow enterFullscreen:fuoptions];
[fullscreenWindow setDelegate:self];
fullscreenEnabled = YES;
@@ -678,12 +678,22 @@
BOOL zoomBoth = [[NSUserDefaults standardUserDefaults]
boolForKey:MMZoomBothKey];
if ((zoomBoth && !cmdLeftClick) || (!zoomBoth && cmdLeftClick))
return frame;
if (!((zoomBoth && !cmdLeftClick) || (!zoomBoth && cmdLeftClick))) {
// Zoom in horizontal direction only.
NSRect currentFrame = [win frame];
frame.size.width = currentFrame.size.width;
frame.origin.x = currentFrame.origin.x;
}
NSRect currentFrame = [win frame];
frame.size.width = currentFrame.size.width;
frame.origin.x = currentFrame.origin.x;
// HACK! The window frame is often higher than the 'defaultFrame' (the fact
// that 'defaultFrame' doesn't cover the entire area up to the menu bar
// seems like a Cocoa bug). To ensure that the window doesn't move
// downwards when the zoom button is clicked we check for this situation
// and return a frame whose max Y coordinate is no lower than the current
// max Y coordinate.
float delta = NSMaxY([win frame]) - NSMaxY(frame);
if (delta > 0)
frame.origin.y += delta;
return frame;
}
+7
View File
@@ -277,6 +277,13 @@ NSString *buildSearchTextCommand(NSString *searchText);
@interface NSDocumentController (MMExtras)
- (void)noteNewRecentFilePath:(NSString *)path;
@end
// ODB Editor Suite Constants (taken from ODBEditorSuite.h)
#define keyFileSender 'FSnd'
#define keyFileSenderToken 'FTok'
+14
View File
@@ -294,3 +294,17 @@ buildSearchTextCommand(NSString *searchText)
@end // NSColor (MMExtras)
@implementation NSDocumentController (MMExtras)
- (void)noteNewRecentFilePath:(NSString *)path
{
NSURL *url = [NSURL fileURLWithPath:path];
if (url)
[self noteNewRecentDocumentURL:url];
}
@end // NSDocumentController (MMExtras)
+3 -3
View File
@@ -698,7 +698,7 @@
i386,
);
COPY_PHASE_STRIP = YES;
CURRENT_PROJECT_VERSION = 26;
CURRENT_PROJECT_VERSION = 27;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
@@ -739,7 +739,7 @@
buildSettings = {
ARCHS = "$(NATIVE_ARCH)";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 26;
CURRENT_PROJECT_VERSION = 27;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
@@ -770,7 +770,7 @@
buildSettings = {
ARCHS = "$(NATIVE_ARCH)";
COPY_PHASE_STRIP = YES;
CURRENT_PROJECT_VERSION = 26;
CURRENT_PROJECT_VERSION = 27;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
+2 -2
View File
@@ -1522,9 +1522,9 @@ gui_macvim_is_valid_action(NSString *action)
void
gui_mch_enter_fullscreen(int fuoptions_flags)
gui_mch_enter_fullscreen(int fuoptions_flags, guicolor_T bg)
{
[[MMBackend sharedInstance] enterFullscreen:fuoptions_flags];
[[MMBackend sharedInstance] enterFullscreen:fuoptions_flags background:bg];
}
+2 -1
View File
@@ -1,7 +1,7 @@
" System gvimrc file for MacVim
"
" Maintainer: Bjorn Winckler <bjorn.winckler@gmail.com>
" Last Change: Fri Mar 21 2008
" Last Change: Sat May 10 2008
"
" This is a work in progress. If you feel so inclined, please help me improve
" this file.
@@ -45,6 +45,7 @@ aunmenu File.Save-Exit
an <silent> 10.290 File.New\ Window :maca newWindow:<CR>
an 10.295 File.New\ Tab :tabnew<CR>
an <silent> 10.310 File.&Open\.\.\. :maca fileOpen:<CR>
an <silent> 10.325 File.Open\ Recent :maca recentFilesDummy:<CR>
an 10.328 File.-SEP0- <Nop>
an <silent> 10.330 File.Close\ Window<Tab>:qa :confirm qa<CR>
an <silent> 10.331 File.Close :maca performClose:<CR>
+36
View File
@@ -40,6 +40,42 @@
Sparkle supports updates in zip, tar, tbz, tgz, or dmg format.
-->
<item>
<title>Snapshot 27 released</title>
<description><![CDATA[
<h1>MacVim snapshot 27 released</h1>
<p> This is the first snapshot compiled on the new Mac I bought with money
donated from MacVim users! There were problems with compiling universal
binaries with Ruby and Perl support on PPC/Tiger so I was hoping to be able
to include these now that I have Intel/Leopard. The good news is that Ruby
support is now included, but Perl still is problematic and I had to drop
TCL support. I will try to get these working in a future snapshot.
</p>
<p> Here is the list of changes since snapshot 26:
<ul>
<li> 'fuoptions' now support setting the background color while in
full-screen mode, check ":h 'fuopt'" (patch by Enno Lübbers) </li>
<li> &lt;D-w&gt; shows confirmation dialog when buffer is modified </li>
<li> setting 'antialias' from gvimrc now works </li>
<li> zooming a window no longer causes it to move downwards </li>
<li> the File menu now contains a "Recent Files" submenu; note that only
files opened from Finder or with the ":browse" command are added to this
list, and not files opened with e.g. ":e" (patch by Nico Weber) </li>
<li> includes latest Vim patches and runtime files </li>
</ul>
</p>
]]></description>
<pubDate>Sun, 11 May 2008 16:36 CET</pubDate>
<enclosure type="application/octet-stream"
url="http://macvim.googlecode.com/files/MacVim-snapshot-27.tbz"
length="8104821"
sparkle:version="27"
sparkle:shortVersionString="7.1"
/>
</item>
<item>
<title>Snapshot 26 released</title>
<description><![CDATA[
+6 -4
View File
@@ -1,10 +1,12 @@
#!/bin/sh
export MACOSX_DEPLOYMENT_TARGET=10.4
# Increment build number
/Developer/Tools/agvtool next-version -all > /dev/null
/Developer/usr/bin/agvtool next-version -all > /dev/null
# Get current build number
BUILDNUM=`/Developer/Tools/agvtool what-version -terse`
BUILDNUM=`/Developer/usr/bin/agvtool what-version -terse`
DEST=~/Desktop/MacVim-snapshot-$BUILDNUM
echo '****************************************************'
@@ -16,8 +18,8 @@ echo ''
echo 'BUILDING VIM BINARY'
echo ' running configure...'
cd .. && ./configure --enable-gui=macvim --with-mac-arch=both \
--with-features=huge --enable-pythoninterp --enable-tclinterp \
--enable-cscope \
--with-features=huge --enable-pythoninterp \
--enable-cscope --enable-rubyinterp \
--with-compiledby="Bjorn Winckler <bjorn.winckler@gmail.com>" > /dev/null
echo ' cleaning...'
+4 -1
View File
@@ -1883,6 +1883,8 @@ installmacros: $(DEST_VIM) $(DEST_RT) $(DEST_MACRO)
installtutorbin: $(DEST_VIM)
$(INSTALL_DATA) vimtutor $(DEST_BIN)/$(VIMNAME)tutor
chmod $(SCRIPTMOD) $(DEST_BIN)/$(VIMNAME)tutor
$(INSTALL_DATA) gvimtutor $(DEST_BIN)/$(GVIMNAME)tutor
chmod $(SCRIPTMOD) $(DEST_BIN)/$(GVIMNAME)tutor
installtutor: $(DEST_RT) $(DEST_TUTOR)
-$(INSTALL_DATA) $(TUTORSOURCE)/README* $(TUTORSOURCE)/tutor* $(DEST_TUTOR)
@@ -2091,6 +2093,7 @@ installmanlinks:
uninstall: uninstall_runtime
-rm -f $(DEST_BIN)/$(VIMTARGET)
-rm -f $(DEST_BIN)/vimtutor
-rm -f $(DEST_BIN)/gvimtutor
-rm -f $(DEST_BIN)/$(EXTARGET) $(DEST_BIN)/$(VIEWTARGET)
-rm -f $(DEST_BIN)/$(GVIMTARGET) $(DEST_BIN)/$(GVIEWTARGET)
-rm -f $(DEST_BIN)/$(RVIMTARGET) $(DEST_BIN)/$(RVIEWTARGET)
@@ -2187,7 +2190,7 @@ SHADOWDIR = shadow
shadow: runtime pixmaps
mkdir $(SHADOWDIR)
cd $(SHADOWDIR); ln -s ../*.[ch] ../*.in ../*.sh ../*.xs ../*.xbm ../toolcheck ../proto ../vimtutor ../mkinstalldirs .
cd $(SHADOWDIR); ln -s ../*.[ch] ../*.in ../*.sh ../*.xs ../*.xbm ../toolcheck ../proto ../vimtutor ../gvimtutor ../mkinstalldirs .
mkdir $(SHADOWDIR)/auto
cd $(SHADOWDIR)/auto; ln -s ../../auto/configure .
cd $(SHADOWDIR); rm -f auto/link.sed
+89
View File
@@ -845,6 +845,7 @@ Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-darwin Disable Darwin (Mac OS X) support.
--disable-selinux Don't check for SELinux support.
--disable-xsmp Disable XSMP session management
--disable-xsmp-interact Disable XSMP interaction
--enable-mzschemeinterp Include MzScheme interpreter.
@@ -3611,6 +3612,94 @@ echo "${ECHO_T}no" >&6
esac
fi
echo "$as_me:$LINENO: checking --disable-selinux argument" >&5
echo $ECHO_N "checking --disable-selinux argument... $ECHO_C" >&6
# Check whether --enable-selinux or --disable-selinux was given.
if test "${enable_selinux+set}" = set; then
enableval="$enable_selinux"
else
enable_selinux="yes"
fi;
if test "$enable_selinux" = "yes"; then
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
echo "$as_me:$LINENO: checking for is_selinux_enabled in -lselinux" >&5
echo $ECHO_N "checking for is_selinux_enabled in -lselinux... $ECHO_C" >&6
if test "${ac_cv_lib_selinux_is_selinux_enabled+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lselinux $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char is_selinux_enabled ();
int
main ()
{
is_selinux_enabled ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_selinux_is_selinux_enabled=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_selinux_is_selinux_enabled=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5
echo "${ECHO_T}$ac_cv_lib_selinux_is_selinux_enabled" >&6
if test $ac_cv_lib_selinux_is_selinux_enabled = yes; then
LIBS="$LIBS -lselinux"
cat >>confdefs.h <<\_ACEOF
#define HAVE_SELINUX 1
_ACEOF
fi
else
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
fi
echo "$as_me:$LINENO: checking --with-features argument" >&5
+1
View File
@@ -155,6 +155,7 @@
#undef HAVE_READLINK
#undef HAVE_RENAME
#undef HAVE_SELECT
#undef HAVE_SELINUX
#undef HAVE_SETENV
#undef HAVE_SETPGID
#undef HAVE_SETSID
+13
View File
@@ -308,6 +308,19 @@ case `uname` in
esac
fi
dnl Link with -lselinux for SELinux stuff; if not found
AC_MSG_CHECKING(--disable-selinux argument)
AC_ARG_ENABLE(selinux,
[ --disable-selinux Don't check for SELinux support.],
, enable_selinux="yes")
if test "$enable_selinux" = "yes"; then
AC_MSG_RESULT(no)
AC_CHECK_LIB(selinux, is_selinux_enabled,
[LIBS="$LIBS -lselinux"
AC_DEFINE(HAVE_SELINUX)])
else
AC_MSG_RESULT(yes)
fi
dnl Check user requested features.
+5 -1
View File
@@ -1160,6 +1160,7 @@ do_filter(line1, line2, eap, cmd, do_in, do_out)
if (!do_out)
msg_putchar('\n');
/* Create the shell command in allocated memory. */
cmd_buf = make_filter_cmd(cmd, itmp, otmp);
if (cmd_buf == NULL)
goto filterend;
@@ -1180,7 +1181,10 @@ do_filter(line1, line2, eap, cmd, do_in, do_out)
if (do_out)
{
if (u_save((linenr_T)(line2), (linenr_T)(line2 + 1)) == FAIL)
{
vim_free(cmd_buf);
goto error;
}
redraw_curbuf_later(VALID);
}
read_linecount = curbuf->b_ml.ml_line_count;
@@ -4471,7 +4475,7 @@ do_sub(eap)
/*
* The new text is build up step by step, to avoid too much
* copying. There are these pieces:
* sub_firstline The old text, unmodifed.
* sub_firstline The old text, unmodified.
* copycol Column in the old text where we started
* looking for a match; from here old text still
* needs to be copied to the new text.
+12
View File
@@ -3651,6 +3651,9 @@ buf_write(buf, fname, sfname, start, end, eap, append, forceit,
)
mch_setperm(backup,
(perm & 0707) | ((perm & 07) << 3));
# ifdef HAVE_SELINUX
mch_copy_sec(fname, backup);
# endif
#endif
/*
@@ -3686,6 +3689,9 @@ buf_write(buf, fname, sfname, start, end, eap, append, forceit,
#endif
#ifdef HAVE_ACL
mch_set_acl(backup, acl);
#endif
#ifdef HAVE_SELINUX
mch_copy_sec(fname, backup);
#endif
break;
}
@@ -4309,6 +4315,12 @@ restore_backup:
}
#endif
#ifdef HAVE_SELINUX
/* Probably need to set the security context. */
if (!backup_copy)
mch_copy_sec(backup, wfname);
#endif
#ifdef UNIX
/* When creating a new file, set its owner/group to that of the original
* file. Get the new device and inode number. */
+9
View File
@@ -4955,6 +4955,15 @@ gui_update_screen()
{
update_topline();
validate_cursor();
#ifdef FEAT_AUTOCMD
/* Trigger CursorMoved if the cursor moved. */
if (!finish_op && has_cursormoved()
&& !equalpos(last_cursormoved, curwin->w_cursor))
{
apply_autocmds(EVENT_CURSORMOVED, NULL, NULL, FALSE, curbuf);
last_cursormoved = curwin->w_cursor;
}
#endif
update_screen(0); /* may need to update the screen */
setcursor();
out_flush(); /* make sure output has been written */
+5
View File
@@ -1346,5 +1346,10 @@ mf_do_open(mfp, fname, flags)
mfp->mf_ffname = NULL;
}
else
{
#ifdef HAVE_SELINUX
mch_copy_sec(fname, mfp->mf_fname);
#endif
mch_hide(mfp->mf_fname); /* try setting the 'hidden' flag */
}
}
+110 -8
View File
@@ -2957,6 +2957,9 @@ static void fill_breakat_flags __ARGS((void));
static int opt_strings_flags __ARGS((char_u *val, char **values, unsigned *flagp, int list));
static int check_opt_strings __ARGS((char_u *val, char **values, int));
static int check_opt_wim __ARGS((void));
#ifdef FEAT_FULLSCREEN
static int check_fuoptions __ARGS((char_u *, unsigned *, int *));
#endif
/*
* Initialize the options, first part.
@@ -5080,10 +5083,8 @@ didset_options()
(void)opt_strings_flags(p_fdo, p_fdo_values, &fdo_flags, TRUE);
#endif
#ifdef FEAT_FULLSCREEN
(void)opt_strings_flags(p_fuoptions, p_fuoptions_values, &fuoptions_flags,
TRUE);
(void)opt_strings_flags(p_fdo, p_fdo_values, &fdo_flags, TRUE);
(void)check_fuoptions(p_fuoptions, &fuoptions_flags,
&fuoptions_bgcolor);
#endif
(void)opt_strings_flags(p_dy, p_dy_values, &dy_flags, TRUE);
#ifdef FEAT_VIRTUALEDIT
@@ -6611,8 +6612,8 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
/* 'fuoptions' */
else if (varp == &p_fuoptions)
{
if (opt_strings_flags(p_fuoptions, p_fuoptions_values,
&fuoptions_flags, TRUE) != OK)
if (check_fuoptions(p_fuoptions, &fuoptions_flags,
&fuoptions_bgcolor) != OK)
errmsg = e_invarg;
}
#endif
@@ -7330,7 +7331,19 @@ set_bool_option(opt_idx, varp, value, opt_flags)
{
if (p_fullscreen && !old_value)
{
gui_mch_enter_fullscreen(fuoptions_flags);
guicolor_T fg, bg;
if (fuoptions_flags & FUOPT_BGCOLOR_HLGROUP)
{
/* Find out background color from colorscheme
* via highlight group id */
syn_id2colors(fuoptions_bgcolor, &fg, &bg);
}
else
{
/* set explicit background color */
bg = fuoptions_bgcolor;
}
gui_mch_enter_fullscreen(fuoptions_flags, bg);
}
else if (!p_fullscreen && old_value)
{
@@ -7340,7 +7353,7 @@ set_bool_option(opt_idx, varp, value, opt_flags)
#endif
#if defined(FEAT_ANTIALIAS) && defined(FEAT_GUI_MACVIM)
else if ((int *)varp == &p_antialias && gui.in_use)
else if ((int *)varp == &p_antialias)
{
gui_macvim_set_antialias(p_antialias);
}
@@ -10789,3 +10802,92 @@ check_ff_value(p)
{
return check_opt_strings(p, p_ff_values, FALSE);
}
#ifdef FEAT_FULLSCREEN
/*
* Read the 'fuoptions' option, set fuoptions_flags and
* fuoptions_bgcolor.
*/
static int
check_fuoptions(p_fuoptions, flags, bgcolor)
char_u *p_fuoptions; /* fuoptions string */
unsigned *flags; /* fuoptions flags */
int *bgcolor; /* background highlight group id */
{
unsigned new_fuoptions_flags;
int new_fuoptions_bgcolor;
char_u *p;
char_u hg_term; /* character terminating
highlight group string in
'background' option' */
int i,j,k;
new_fuoptions_flags = 0;
new_fuoptions_bgcolor = 0xFF000000;
for (p = p_fuoptions; *p; ++p)
{
for (i = 0; ASCII_ISALPHA(p[i]); ++i)
;
if (p[i] != NUL && p[i] != ',' && p[i] != ':')
return FAIL;
if (i == 10 && STRNCMP(p, "background", 10) == 0)
{
if (p[i] != ':') return FAIL;
i++;
if (p[i] == NUL) return FAIL;
if (p[i] == '#')
{
/* explicit color (#aarrggbb) */
i++;
for (j = i; j < i+8 && vim_isxdigit(p[j]); ++j)
;
if (j < i+8)
return FAIL; /* less than 8 digits */
if (p[j] != NUL && p[j] != ',')
return FAIL;
new_fuoptions_bgcolor = 0;
for (k = 0; k < 8; k++)
new_fuoptions_bgcolor = new_fuoptions_bgcolor * 16 +
hex2nr(p[i+k]);
i = j;
/* mark bgcolor as an explicit argb color */
new_fuoptions_flags &= ~FUOPT_BGCOLOR_HLGROUP;
}
else
{
/* highlight group name */
for (j = i; ASCII_ISALPHA(p[j]); ++j)
;
if (p[j] != NUL && p[j] != ',')
return FAIL;
hg_term = p[j];
p[j] = NUL; /* temporarily terminate string */
new_fuoptions_bgcolor = syn_name2id((char_u*)(p+i));
p[j] = hg_term; /* restore string */
if (! new_fuoptions_bgcolor)
return FAIL;
i = j;
/* mark bgcolor as highlight group id */
new_fuoptions_flags |= FUOPT_BGCOLOR_HLGROUP;
}
}
else if (i == 7 && STRNCMP(p, "maxhorz", 7) == 0)
new_fuoptions_flags |= FUOPT_MAXHORZ;
else if (i == 7 && STRNCMP(p, "maxvert", 7) == 0)
new_fuoptions_flags |= FUOPT_MAXVERT;
else
return FAIL;
p += i;
if (*p == NUL)
break;
if (*p == ':')
return FAIL;
}
*flags = new_fuoptions_flags;
*bgcolor = new_fuoptions_bgcolor;
return OK;
}
#endif
+7 -5
View File
@@ -472,11 +472,13 @@ EXTERN int p_fs; /* 'fsync' */
EXTERN int p_fullscreen;
EXTERN char_u *p_fuoptions;
EXTERN unsigned fuoptions_flags;
#ifdef IN_OPTION_C
static char *(p_fuoptions_values[]) = {"maxvert", "maxhorz", NULL};
#endif
#define FUOPT_MAXVERT 0x001
#define FUOPT_MAXHORZ 0x002
EXTERN int fuoptions_bgcolor;
#define FUOPT_MAXVERT 0x001
#define FUOPT_MAXHORZ 0x002
#define FUOPT_BGCOLOR_HLGROUP 0x004 /* if set, fuoptions_bgcolor
is a highlight group
id. Else, it's an explicit
argb color. */
#endif
EXTERN int p_gd; /* 'gdefault' */
#ifdef FEAT_PRINTER
+61
View File
@@ -45,6 +45,11 @@
# include <X11/SM/SMlib.h>
#endif
#ifdef HAVE_SELINUX
# include <selinux/selinux.h>
static int selinux_enabled = -1;
#endif
/*
* Use this prototype for select, some include files have a wrong prototype
*/
@@ -2559,6 +2564,62 @@ typedef struct vim_acl_solaris_T {
} vim_acl_solaris_T;
# endif
#if defined(HAVE_SELINUX) || defined(PROTO)
/*
* Copy security info from "from_file" to "to_file".
*/
void
mch_copy_sec(from_file, to_file)
char_u *from_file;
char_u *to_file;
{
if (from_file == NULL)
return;
if (selinux_enabled == -1)
selinux_enabled = is_selinux_enabled();
if (selinux_enabled > 0)
{
security_context_t from_context = NULL;
security_context_t to_context = NULL;
if (getfilecon((char *)from_file, &from_context) < 0)
{
/* If the filesystem doesn't support extended attributes,
the original had no special security context and the
target cannot have one either. */
if (errno == EOPNOTSUPP)
return;
MSG_PUTS(_("\nCould not get security context for "));
msg_outtrans(from_file);
msg_putchar('\n');
return;
}
if (getfilecon((char *)to_file, &to_context) < 0)
{
MSG_PUTS(_("\nCould not get security context for "));
msg_outtrans(to_file);
msg_putchar('\n');
freecon (from_context);
return ;
}
if (strcmp(from_context, to_context) != 0)
{
if (setfilecon((char *)to_file, from_context) < 0)
{
MSG_PUTS(_("\nCould not set security context for "));
msg_outtrans(to_file);
msg_putchar('\n');
}
}
freecon(to_context);
freecon(from_context);
}
}
#endif /* HAVE_SELINUX */
/*
* Return a pointer to the ACL of file "fname" in allocated memory.
* Return NULL if the ACL is not available for whatever reason.
+1 -1
View File
@@ -190,7 +190,7 @@ int serverPeekReply(int port, char_u **str);
int serverReadReply(int port, char_u **str);
int serverSendReply(char_u *serverid, char_u *str);
void gui_mch_enter_fullscreen(int fuoptions_flags);
void gui_mch_enter_fullscreen(int fuoptions_flags, guicolor_T bg);
void gui_mch_leave_fullscreen(void);
void gui_macvim_update_modified_flag();
+1
View File
@@ -34,6 +34,7 @@ int mch_isFullName __ARGS((char_u *fname));
void fname_case __ARGS((char_u *name, int len));
long mch_getperm __ARGS((char_u *name));
int mch_setperm __ARGS((char_u *name, long perm));
void mch_copy_sec __ARGS((char_u *from_file, char_u *to_file));
vim_acl_T mch_get_acl __ARGS((char_u *fname));
void mch_set_acl __ARGS((char_u *fname, vim_acl_T aclent));
void mch_free_acl __ARGS((vim_acl_T aclent));
+8
View File
@@ -681,6 +681,14 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
297,
/**/
296,
/**/
295,
/**/
294,
/**/
293,
/**/
+16 -7
View File
@@ -2,11 +2,24 @@
# Start Vim on a copy of the tutor file.
# Usage: vimtutor [xx], where xx is a language code like "es" or "nl".
# Usage: vimtutor [-g] [xx]
# Where optional argument -g starts vimtutor in gvim (GUI) instead of vim.
# and xx is a language code like "es" or "nl".
# When an argument is given, it tries loading that tutor.
# When this fails or no argument was given, it tries using 'v:lang'
# When that also fails, it uses the English version.
# Vim could be called "vim" or "vi". Also check for "vimN", for people who
# have Vim installed with its version number.
# We anticipate up to a future Vim 8 version :-).
seq="vim vim8 vim75 vim74 vim73 vim72 vim71 vim70 vim7 vim6 vi"
if test "$1" = "-g"; then
# Try to use the GUI version of Vim if possible, it will fall back
# on Vim if Gvim is not installed.
seq="gvim gvim8 gvim75 gvim74 gvim73 gvim72 gvim71 gvim70 gvim7 gvim6 $seq"
shift
fi
xx=$1
export xx
@@ -39,10 +52,6 @@ export TUTORCOPY
# remove the copy of the tutor on exit
trap "rm -rf $TODELETE" 0 1 2 3 9 11 13 15
# Vim could be called "vim" or "vi". Also check for "vimN", for people who
# have Vim installed with its version number.
# We anticipate up to a future Vim 8 version :-).
seq="vim vim8 vim75 vim74 vim73 vim72 vim71 vim70 vim7 vim6 vi"
for i in $seq; do
testvim=`which $i 2>/dev/null`
if test -f "$testvim"; then
@@ -59,7 +68,7 @@ fi
# Use Vim to copy the tutor, it knows the value of $VIMRUNTIME
# The script tutor.vim tells Vim which file to copy
$VIM -u NONE -c 'so $VIMRUNTIME/tutor/tutor.vim'
$VIM -f -u NONE -c 'so $VIMRUNTIME/tutor/tutor.vim'
# Start vim without any .vimrc, set 'nocompatible'
$VIM -u NONE -c "set nocp" $TUTORCOPY
$VIM -f -u NONE -c "set nocp" $TUTORCOPY